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

Driving Key (Relationship)

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

Driving Key (DrivingKey) marks the relationships of a Driving Key Link whose Hub keys form the driving key. Link Satellites of the Driving Key Link close their previous version per driving key, see BG_ValidToTimestamp.

Where to set it

Set the property when you edit a relationship of a Driving Key Link or a Business Driving Key Link.

Values and default

  • true (default): the business keys of the relationship are part of the driving key.
  • false: the relationship is part of the Link key only. Set it on every relationship that does not belong to the driving key.

Effect on generated output

The hashing view calculates DrivingKeyLink_HK from the business keys of the relationships with true. Link_HK covers the business keys of all relationships.

Example

A Driving Key Link relates an employee and a job function. The relationship EMPLOYEE has Driving Key true, the relationship jobfunction has false. The hashing view on Microsoft SQL Server calculates, shortened:

HASHBYTES('SHA1', ... [FK_common_employee_EMPLOYEE_EMPLOYEE_ID] ...)
    AS [DrivingKeyLink_HK]
HASHBYTES('SHA1', ... [FK_common_employee_EMPLOYEE_EMPLOYEE_ID] ...
    + N'_' + ... [FK_common_jobfunction_jobfunction_JOBFUNCTION_ID] ...)
    AS [Link_HK]

The driving key is the employee alone, while each pair of employee and job function is a separate Link row.

Related articles