In a typical use case, the consolidation process expects that each record on each message identifies itself with key fields, and that data sourced from one message could later be updated with data from another. In this respect the data on the messages in non-unique.
For fact/transaction data, each message represents a unique set of data. It may be possible to identify key fields on the data that uniquely identify the data. However, this may not be possible, or it may be more convenient to load the data without specifying any unique keys.
In these cases, you can specify that the entity is unique. This means that each message is loaded without looking for unique keys on the message. Instead, two key values are automatically generated - one that holds the identifier of the message, and one that holds a sequence number for the record within the message.
To do this:
- Define a text field of length 36 to hold the unique identifier of the message. This would often be called something like "batch_id" or "message_id".
- Define an integer field to hold the sequence number that, in combination with the unique identifier of the message, will uniquely identify the record.
- Add the unique identifier and unique sequence fields to the entity, making them the key fields.
- On the entity, on the Unique tab:
- Check the box to indicate that messages are unique.
- In the Unique identifier field, select the field that will hold the unique identifier of the message.
- In the Unique sequence field, select the field that will hold the record sequence.
The unique tab should look something like this.