Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Data Vault mapping task template configuration tutorial

Data Vault mapping task template configuration tutorial

Step 1. Load business keys to a hub table

Step 1. Load business keys to a hub table

In the source landing table, the CUSTOMER_ID field is the primary key. We want to hash this value and write both keys to the H_CUSTOMER hub table along with the date the records are inserted. To do this, we use the Data Vault – Hub task template.
The following image shows the mapping this template is based on:
When the task runs, it hashes the incoming primary key and uses the hash attribute as the primary key in the hub table.
  1. On the
    Templates
    page, click the
    Data Vault – Hub
    tile and then click
    Create a mapping task
    .
  2. On the
    General
    tab, select the runtime environment to run the task and then click
    Next
    .
  3. On the
    Sources
    tab, select the landing table connection and object for the Src_Landing_Table source.
  4. Select the connection and hub table for the Src_Hub_Table source.
    The template is preconfigured to check if records are already present in the target hub table.
  5. Click
    Next
    .
  6. On the
    Target
    tab, select the target connection and the target hub table.
  7. Select the
    Insert
    operation.
  8. On the
    Input parameters
    page, resolve the following parameters:
    1. Hub Key from Landing Table. Defines the primary key in the landing table. You define the CUSTOMER_ID field as the primary key using the following expression:
      TO_CHAR(TRUNC(CUSTOMER_ID))
    2. Filter Existing Records. Filters out records that already exist in the hub table so only new records get inserted. You enter the following expression:
      IIF(ISNULL(BK_CUSTOMER_ID),TRUE, FALSE)
    3. Join Condition. Joins the landing table and the hub table by the CUSTOMER_ID field. You specify the join condition using the following condition:
      Landing_Hub_Key = BK_CUSTOMER_ID
    4. Hub Field Mapping. The following table shows the field mapping configuration to write data to the target:
      Target fields
      Incoming fields
      CUSTOMER_HUB_KEY
      Landing_Hash_Key
      EX_CUSTOMER_ID
      Landing_Hub_Key
      DATE_INSERTED
      DATE_INSERTED
  9. Click
    Save
    .
When the task runs, it loads the new business keys into the hub table along with the hash key and the date when the record is loaded as shown in the following image:

0 COMMENTS

We’d like to hear from you!