Skip to content
  • There are no suggestions because the search field is empty.

Driving Key Link

Applies to
Platform: Microsoft SQL Server · Snowflake · Snowflake dbt · Databricks · Databricks dbt · Fabric Lakehouse · Fabric Warehouse · Oracle
Architecture: Data Vault

A Driving Key Link is a Link with a second hash key, DrivingKeyLink_HK, calculated from the relationships marked as driving key. Use it when one side of a relationship decides which relationship is current, for example an employee who has exactly one job function at a time. A Link Satellite on the Driving Key Link then closes the previous relationship of the employee when a new one arrives.

Sources and relationships

A Driving Key Link reads Stages, RawVault Composites and Store Entities of a linked Data Store project, in one or more dataflows. It has at least two relationships to Hubs. The relationship property Driving Key marks the driving side; its default is true, so set it to false on the other relationships. The foreign-key terms are the business keys of the Driving Key Link.

Link Satellites, Record Tracking Link Satellites, Effectivity Link Satellites reference a Driving Key Link. PIT, Current View, History View, BusinessVault Composite, Vault Out and the Business Vault types can read it as a source.

Create a Driving Key Link

A Driving Key Link holds only foreign-key terms and Default Terms. Validation reports an error for any other term; descriptive data goes into a Link Satellite.

Properties

Default Terms

See How biGENIUS-X builds hash values.

Generated objects

The part flow of Driving Key Link shows which parts it can get and under which settings; the legend explains the symbols.

Part flow of Business Driving Key Link, Business Link, Driving Key Link, Hierarchical Business Link, Hierarchical Link, Link, Same As Business Link and Same As Link, top to bottom. The main path on the left, with the default settings, runs _Source, _Hashing, _Delta, _Loader, Table, _Result. Decisions with their values, the default or main value first: Deduplication Method (None; Distinct, Partition); Before-load rule (no; yes); Load Caching (empty; Hashing); Create Result Views (true; false); Logging (yes); Use Embryo Loader (true). Detours add the other parts: _Deduplication, _DataQualityLoader, _DataQualityTable, _DataQualityResult, _DataQualityBeforeLoadAction, _DataQualityError, _HashingLoader, _HashingTable, _EmbryoLoader.

These are the names on Microsoft SQL Server for the Driving Key Link load_dkl with one dataflow:

RoleGenerated namePurposeGenerated when
SourceRDV_DKLNK_load_dkl_SourceReads the sourcesAlways
DeduplicationRDV_DKLNK_load_dkl_DeduplicationRemoves duplicate rowsDeduplication Method Distinct or Partition
DataQualityLoaderRDV_DKLNK_load_dkl_DataQualityLoaderChecks the rules and fills the data quality tableAn active rule that runs before the load
DataQualityStorageRDV_DKLNK_load_dkl_DataQualityTableHolds the rows and their check resultsAn active rule that runs before the load
DataQualityBeforeLoadActionRDV_DKLNK_load_dkl_DataQualityBeforeLoadActionApplies the rule actions before the loadAn active rule that runs before the load
IntermediateResultRDV_DKLNK_load_dkl_DataQualityResultPasses the rows to loadAn active rule that runs before the load
ErrorRDV_DKLNK_load_dkl_DataQualityErrorHolds the rows that break a ruleAn active rule with Logging
HashingRDV_DKLNK_load_dkl_HashingCalculates the hash keysAlways
HashingStorageRDV_DKLNK_load_dkl_HashingTableStores the hashed rowsLoad Caching Hashing
HashingLoaderRDV_DKLNK_load_dkl_HashingLoaderFills the hashing tableLoad Caching Hashing
EmbryoLoaderRDV_DKLNK_load_dkl_EmbryoLoaderAdds missing Hub keysUse Embryo Loader on a relationship
DeltaRDV_DKLNK_load_dkl_DeltaSelects new key combinationsAlways
LoaderRDV_DKLNK_load_dkl_LoaderInserts the new rowsAlways
StorageRDV_DKLNK_load_dklDriving Key Link tableAlways
ResultRDV_DKLNK_load_dkl_ResultQuery viewCreate Result Views true
  • The table script inserts the unknown-member row with hash keys of zeros. The result view hides it.
  • When no other model object has a relationship to the Driving Key Link, its result view shows only the latest row per DrivingKeyLink_HK.

Generated parts of model objects shows the order in which a load runs the parts and the settings that add or remove them.

  • The Link Satellite carries DrivingKeyLink_HK next to Link_HK.
  • Its row hash includes the business keys of the relationships that are not driving.
  • Its validity ends per DrivingKeyLink_HK. A new relationship of the same driving key therefore ends the version of the previous relationship.

Example

The Driving Key Link load_dkl on Microsoft SQL Server reads the Stage EMPLOYEE. Its relationship to the Hub common_employee (role EMPLOYEE) is driving; the one to the Hub common_jobfunction (role jobfunction) is not. The Link Satellite load_employee_dklsat_1 stores MANAGER_ID and other employee data. The loads deliver these rows:

  • Load 1 on 2026-10-28 08:00: employee 101 with job function 10, employees 102 and 103 with job function 20 and manager 101.
  • Load 2 on 2026-10-29 08:00: employee 102 moves to job function 30, employee 103 gets manager 102, and employee 104 is new with job function 10 and manager 102.

Check the result

Query the Driving Key Link, here in the schema rv:

SELECT FK_common_employee_EMPLOYEE_EMPLOYEE_ID AS EMPLOYEE_ID,
       FK_common_jobfunction_jobfunction_JOBFUNCTION_ID AS JOB_ID,
       Link_HK, DrivingKeyLink_HK, BG_LoadTimestamp
FROM rv.RDV_DKLNK_load_dkl_Result
ORDER BY EMPLOYEE_ID, BG_LoadTimestamp;

This is the result after load 2, with hash keys shortened to their first four bytes:

EMPLOYEE_ID  JOB_ID  Link_HK     DrivingKeyLink_HK  BG_LoadTimestamp
101          10      0xF5A3FB96  0x6348AE9A         2026-10-28 08:00
102          20      0x7253958A  0x8887BDD9         2026-10-28 08:00
102          30      0xBF5A86A3  0x8887BDD9         2026-10-29 08:00
103          20      0x30ED23FA  0x9D4E8CB4         2026-10-28 08:00
104          10      0x542F37C7  0x01656192         2026-10-29 08:00

Then query the Link Satellite with the keys of the Driving Key Link:

SELECT l.FK_common_employee_EMPLOYEE_EMPLOYEE_ID AS EMPLOYEE_ID,
       l.FK_common_jobfunction_jobfunction_JOBFUNCTION_ID AS JOB_ID,
       s.MANAGER_ID, s.BG_ValidFromTimestamp, s.BG_ValidToTimestamp
FROM rv.RDV_LSAT_load_employee_dklsat_1_Result AS s
JOIN rv.RDV_DKLNK_load_dkl_Result AS l ON l.Link_HK = s.Link_HK
ORDER BY EMPLOYEE_ID, s.BG_ValidFromTimestamp;

This is the Link Satellite after load 2, with the column names shortened:

EMPLOYEE_ID  JOB_ID  MANAGER_ID  ValidFrom         ValidTo
101          10      NULL        2026-10-28 08:00  9999-12-31 00:00
102          20      101         2026-10-28 08:00  2026-10-29 08:00
102          30      101         2026-10-29 08:00  9999-12-31 00:00
103          20      101         2026-10-28 08:00  2026-10-29 08:00
103          20      102         2026-10-29 08:00  9999-12-31 00:00
104          10      102         2026-10-29 08:00  9999-12-31 00:00
  • Employee 102 has two rows in the Driving Key Link with the same DrivingKeyLink_HK. The result view shows both, because the Link Satellite has a relationship to the Driving Key Link.
  • In the Link Satellite, the version with job function 20 ends at load 2, when job function 30 starts. Only one version per employee is open.
  • Employee 103 keeps job function 20; the new manager starts a new version of the same relationship.

Platform differences

The rules for names, loaders, deployment, platform properties and defaults are in Model object types on each platform. The Driving Key Link differs from them in these points:

  • Snowflake: the load control task LC_RDV_DKLNK_<model object name>_TASK calls the loader, and the task LC_RDV_DKLNK_<model object name>_EMBRYOTASK calls the embryo loader.

Limitations

  • A Driving Key Link has at least two relationships and no terms other than foreign keys and Default Terms.
  • The Driving Key Link alone does not show which relationship is current. Its Link Satellite shows it.
  • A dataflow that delivers the same key combination twice in one load makes the loader fail with a primary key violation. A Deduplication Method removes such duplicates before hashing.

Release differences

  • Generator 2.2: Use Embryo Loader is available.
  • Generator 2.3: Custom Singleton Values is available.
  • Generator 2.4: Link Satellites of a Driving Key Link end their versions per DrivingKeyLink_HK.
  • Generator 2.4.1: with Load Caching Hashing and several dataflows, each dataflow has its own hashing table, named with the dataflow.

Related articles