Dynamic Balance and Meter Key Field Definitions

A dynamic balance or meter template consists of a list of key field definitions, each of which can be either a field name or a matrix. A separate instance is created for each unique combination of values from the specified field names or matrices.

Use a field name when every unique value for the field must result in a separate balance instance. If the field is not set, it is treated as having a null value. A key field cannot be any of the following:
  • List field
  • Array field
  • Blob field
  • Struct field
    Note: Individual fields within a struct field can be used.

Use a matrix when separate balance instances are not needed for every possible value for a field. Using a matrix, you can create a balance instance for a set of values or a range of values for a field.

To define a key field definition using a matrix, create an aggregation selector object and specify it in the key field definition.