Skip to content

Standard Link

Hoa Le edited this page May 23, 2023 · 1 revision

Standard Link (aka standard_link)

This table is all about defining the standard link entities within your Data Vault. Here you configure the names of the links, foreign keys (e.g. Hub Hashkeys) and detailed information about possible prejoins.

Columns

The following columns are required in the table/worksheet called "standard_link" inside your metadata:

Name Explanation
Link_Identifier A globally unique identifier of this one link object.
Target_Link_Table_Physical_Name The name of this link object. Will be used for naming the generated link model.
Source_Table_Identifier The global identifier of the source. Used to create a relation between link and source.
Source_column_physical_name The physical name of the column that holds the business key of the source.
Prejoin_Table_Identifier(optional) The globally unique identifier of the source that is needed for the prejoin.
Prejoin_Table_Column_Name(optional) The physical name of the business key inside the source table, that refers to the source data.
Prejoin_Extraction_Column_Name(optional) The physical name of the business key inside the prejoined table.
Prejoin_Target_Column_Alias(optional) An optional column to give the prejoined business key an alias.
Hub_identifier(optional) The unique identifier of the parent hub entity this link is attached to. Defined in the metadata
Hub_primary_key_physical_name(optional) The physical name of the primary key/hash key column of a referenced hub.
Target_column_physical_name The physical name of the column in the target link table.
Target_Column_Sort_Order The position of the business key in the sort order for the hashkey generation.
Target_Primary_Key_Physical_Name The physical name of the primary key/hash key for the link object.
Record_Tracking_Satellite(optional) A flag that indicates if a record tracking satellite should be generated. Inputs are 1 and 0 or empty. 1 if you want to create a record tracking satellite, 0 or empty if not.
Group_Name(optional) Defines to which business object group this entry belongs, used for the folder structure of the dbt models as well as the visualization of the entities.

Dependent Child

Turbovault4dbt also allows the generation of dependent child links, therefore you just have to leave the two columns for the Hub_identifier and Hub_primary_key_physical_name empty. An example is shown below.

Example Standard Link

See the following example values for each column. In total, they describe the link "solution_contact_sfdc_l" between the hubs "solution_h" and "contact_h" from the source system "Salesforce".

Link_Identifier Target_link_table_physical_name Source_Table_Identifier Source_column_physical_name Prejoin_Table_Identifier Prejoin_Table_Column_Name Prejoin_Extraction_Column_Name Prejoin_Target_Column_Alias Hub_identifier Hub_primary_key_physical_name Target_column_physical_name Target_Column_Sort_Order Target_Primary_Key_Physical_Name Record_Tracking_Satellite Group_Name
L0001 solution_contact_sfdc_l SRC001 sf4twitter__Contact__c SRC0002 Id Contact_Key__c H0003 hk_contact_h hk_contact_h 2 hk_solution_contact_sfdc_l 1 Solution
L0001 solution_contact_sfdc_l SRC001 SolutionNumber H0001 hk_solution_h hk_solution_h 1 hk_solution_contact_sfdc_l 1 Solution

Example Dependent Child Link

See the following example values for each column. In total, they describe the dependent child link "lineitem_l" between the hubs "orders_h", "part_h" and "supp_h" from the source system "TPC-H".

Link_Identifier Target_link_table_physical_name Source_Table_Identifier Source_column_physical_name Prejoin_Table_Identifier Prejoin_Table_Column_Name Prejoin_Extraction_Column_Name Prejoin_Target_Column_Alias Hub_identifier Hub_primary_key_physical_name Target_column_physical_name Target_Column_Sort_Order Target_Primary_Key_Physical_Name Record_Tracking_Satellite Group_Name
L0002 lineitem_l SRC0005 L_LINENUMBER L_LINENUMBER 1 hk_lineitem_l 0 lineitem
L0002 lineitem_l SRC0005 L_ORDERKEY H0004 hk_orders_h hk_orders_h 2 hk_lineitem_l 0 lineitem
L0002 lineitem_l SRC0005 L_PARTKEY H0002 hk_part_h hk_part_h 3 hk_lineitem_l 0 lineitem
L0002 lineitem_l SRC0005 L_SUPPKEY H0005 hk_supplier_h hk_supplier_h 4 hk_lineitem_l 0 lineitem