Non-Historized Link Properties
Non-Historized Links (NHLs) are a variation of standard Links in Data Vault. They are used to model relationships or events where the history of the relationship itself is not tracked in the same way as descriptive data in Satellites. Instead, NHLs typically store the current state of a relationship or event attributes directly within the Link table.
Non-Historized Link Properties Overview
Property Name | Type | Description |
---|---|---|
name | String | The unique name for the Non-Historized Link object. This name will be used for the generated table. Example: 'USER_SESSION_EVENT' |
entity_type | String | Must be set to 'non_historized_link' to define this object as a Non-Historized Link. |
enable_refresh | Boolean | if true , non-historized link receives new data. Set to false if the source contains not-changing (historical) data. See Shared Properties. |
connected_hubs | List of Key-Value pairs | Defines the list of Hubs that this NHL connects, specifying the relationship between them. Each item maps an alias to a Hub name. See Connected Hubs in Regular Links. |
entity_source | Map | Defines the single source that feed data into this NHL. See Entity Sources Definition. |
non_historized_columns | List of Strings | A list of column names that will be included directly in the NHL table to store non-historized attributes of the relationship or event. |
historized_columns | List of Strings | A list of column names that, while part of the NHL's definition, are typically related to load metadata or event timestamps rather than descriptive attributes. |
Non-Historized Link Specific Property Details
non_historized_columns
- Type:
List of Strings
- Description: This property lists the names of the columns that will be created directly in the Non-Historized Link table to store attributes that describe the event or relationship. These columns are NOT included in the hash difference calculation.
historized_columns
- Type:
List of Strings
- Description: This property lists the names of the columns that will be created directly in the Non-Historized Link table to store attributes that describe the event or relationship. These columns are included in the hash difference calculation.
connected_hubs
- Type:
List of Key-Value pairs
- Description: This property defines the hubs a non-historized link connects, specified as a list of key-value pairs.
- Key: Represents the hub's alias, or the specific name of the relationship. This is necessary because a link can connect to the same hub multiple times, requiring unique aliases to distinguish each connection. The hub alias must be unique within the connected_hubs list.
- Value: Represents the actual name of the hub, which must refer to an existing hub definition.
Example: Link connecting to each hub exactly once
connected_hubs:
- HUB_CUSTOMER: 'HUB_CUSTOMER' # <HUB ALIAS>: <HUB NAME>
- HUB_MATERIAL: 'HUB_MATERIAL'
Example: Link connecting to one hub multiple times
connected_hubs:
- HUB_CUSTOMER_BILL_TO: 'HUB_CUSTOMER'
- HUB_CUSTOMER_DELIVER_TO: 'HUB_CUSTOMER'
- HUB_MATERIAL: 'HUB_MATERIAL'
In this scenario, unique aliases (HUB_CUSTOMER_BILL_TO, HUB_CUSTOMER_DELIVER_TO)
are used to distinguish different types of customer relationships, even though they all point to the HUB_CUSTOMER hub.
Example
This example defines a Non-Historized Link (NHL) named EVENT
that connects HUB_EVENT
and HUB_USER
. It captures event details from a source table CLICK_EVENTS
, including non-historized attributes like EVENT_ID
and USER_ID
, and historized columns for metadata and event timestamps.
name: 'EVENT'
entity_type: 'non_historized_link'
enable_refresh: true
connected_hubs:
- HUB_EVENT: 'HUB_EVENT'
- HUB_USER: 'HUB_USER'
entity_source:
urn:s2v:link_source:src_1:
entity_source: '(SOURCE_DATA, CLICK_EVENTS)'
source_filter: ''
use_source_cdc_flag: true
source_system_configuration_urn: 'urn:s2v:source_setting:yaml_interface'
connected_hub_relations:
- HUB_EVENT:
business_key_mapping:
- EVENT_BK:
- 'EVENT_ID'
source_business_key: ''
- HUB_USER:
business_key_mapping:
- USER_BK:
- 'USER_ID'
source_business_key: ''
non_historized_columns:
- 'EVENT_ID'
- 'USER_ID'
historized_columns:
- 'CDC_TIMESTAMP'
- 'EVENT_TIMESTAMP'
- 'DESTINATION'
Don't forget to ensure that the business key name defined in the business_key_mapping
matches the business key name used in the Hub it connects (HUB_EVENT
has the business key EVENT_BK
and HUB_USER
has the business key USER_BK
).