Non-Historized Link
A Non-Historized Link (NHL) in Data Vault 2.0 is a specialized type of Link that captures the current state of a relationship between Hubs and can also store descriptive attributes about that relationship directly within itself, without requiring a separate Link Satellite.
It is "non-historized" in the sense that it typically represents the latest known attributes of the relationship, though S2V allows for defining historized_columns
within an NHL if needed.
Key Characteristics:
- Connects Hubs: Like regular Links, it establishes relationships between two or more Hubs.
- Stores Attributes Directly: Unlike standard Links, NHLs can store descriptive attributes about the relationship (e.g., status of a connection, preference settings between two entities).
- Single Source Definition: In S2V, NHLs are typically fed from a single
entity_source
definition, similar to how Satellites are defined.
Role in Data Vault:
NHLs are useful for modeling relationships where the attributes of the relationship itself are important and you want to query them directly alongside the relationship, often reflecting the current operational state. They can simplify queries for current-state relationship attributes compared to joining a Link with its Satellite. However, if full historization of relationship attributes is paramount, a Link with an associated Link Satellite is the more traditional DV2.0 approach.
Simple Non-Historized Link Example:
This example defines an NHL NHL_SALES_ORDER_CONDITION_TYPES
that connects HUB_SALES_ORDER
and HUB_CONDITION_TYPE
.
name: 'NHL_SALES_ORDER_CONDITION_TYPES'
enable_refresh: true
entity_type: 'non_historized_link'
connected_hubs:
- SALES_ORDER: 'HUB_SALES_ORDER'
- CONDITION_TYPE: 'HUB_CONDITION_TYPE'
entity_source:
urn:s2v:link_source:2LIS_13_VDKON: # URN identifying this source configuration
entity_source: '(SAP_OE, 2LIS_13_VDKON)' # Source: (Schema, Table)
source_filter: '' # Optional filter
source_system_configuration_urn: 'urn:s2v:source_setting:SAP'
use_source_cdc_flag: true
connected_hub_relations:
- SALES_ORDER:
business_key_mapping:
- SALES_ORDER_BK: # Business key name from HUB_SALES_ORDER
- 'VBELN' # Source column VBELN from table 2LIS_13_VDKON
- 'POSNR' # Source column POSNR from table 2LIS_13_VDKON
source_business_key: 'SAP_OE_SD' # Optional source system identifier
- CONDITION_TYPE:
business_key_mapping:
- CONDITION_TYPE_BK:
- 'KSCHL'
source_business_key: 'SAP_OE'
non_historized_columns:
- 'VBELN'
- 'POSNR'
- 'KSCHL'
historized_columns:
- 'GBSTK'
- 'WBSTK'
- 'AEDAT'
- 'KUNRG'
- 'KUNAG'
- 'BUKRS'
- 'BZIRK'
- For a detailed step-by-step guide on building a Link, please refer to the How to build a Non-Historized Link? tutorial.
- For a comprehensive guide on all available properties and detailed explanations for defining a Hub, please refer to the Non-Historized Link Reference.