Transactional links are used for storing non-historized transaction or event data.
Transactional links do not store change history. Transactions or events stored to a transactional link should not receive changes.
The primary key (dv_id) is hashed from a unique business identifier for the transaction or event.
Transactional links contain references to hubs like a regular link but can also contain descriptive and measurable attributes; they are comparable to fact tables and are commonly used as the basis for a fact.
A transactional link has performance benefits over a hub + satellite + link combination especially when the data volume is high as fewer joins are required when loading data from the Data Vault to the publish zone.
Creating a transactional link
Follow these steps to create a transactional link:
Navigate to the source entity (staging table) and create an outgoing load selecting the hub as target entity.
Create an entity mapping as follows:
Transaction business key attribute(s) in source entity.
Map the unique business identifier attribute(s) for the transaction/event into the dv_id.
For example, this could be the order id & order line id if you are creating a transactional link for order line.
Another example could be a combination of a business key and a timestamp if you are creating a transactional link for an event.
Load timestamp, does not need any modifications by default.
Run ID (see Using Run ID Logic), does not need any modifications by default.
Source name attribute in source entity.
NONE / CUSTOM
Best practice is to have the source name as a metadata attribute on staging entities and to map it to Data Vault entities without any transformations.
Alternatively, a CUSTOM transformation can be used e.g. with a source name or an environment variable given in single quotes. However, it is best to avoid the CUSTOM transformation type if possible.
Business key attribute(s) in source entity.
Create a new attribute for each hub reference and map the source attributes.
Note that if you add a foreign key reference from the link keys to the hub dv_ids beforehand, you can use the same mapping as in the primary key automatically by selecting Copy by Reference.
Descriptive or measureable attributes from the source entity.
Map all the required descriptive and measurable attributes.
Use the Export SQL feature to preview entity SQL & load SQL.
Note that you can modify the default entity and attribute naming used in the examples in the CONFIG_ENTITY_DEFAULTS configuration package to fit your naming conventions. See more in Customizing default attributes and transformations
You can use the default LINK entity type for transactional links as well.
Define a naming convention for transactional links, for example: L_T_<descriptive_name>, L_T_ORDER_LINE.
For use cases with high volumes of data, see the example for Using Run ID Logic together with Timeslot Logic. This load pattern can greatly reduce load times and enable even high-frequency near real-time use cases.