Example template Series : Slowly Changing Type 2 based on a single HUB

The attached documents describe how a user can configure a template in the VaultSpeed Studio to generate an SCD Type 2 dimension based on an insert-only RDV on a single HUB based on the transaction timestamp. 

In the setup there is the possibility to limit the fields which should show up in the dimension.  The generated query will also remove unnecessary records (no changes in the combination of selected fields).

  • DIMENSION creation based on a HUB

  • Slowly Changing Type 2 Dimension

  • Versions in the dimension will be compressed

  • PIT table must exist on the HUB

  • Dimension_hkey will be calculated based on the BK’s of the MAIN_HUB in combination with the date

Before you explore and use this example template, ensure that you understand the example SQL attached to understand what the template does and that it covers your needs.

The example that is used in this document is based on a customer. 

In the Raw Data Vault model this is a HUB_CUSTOMER.

Various tasks that are needed:

  • PIT table on the HUB of choice

  • Signature objects

  • Assign Signature objects to the correct tables

  • Create Signature attribute type and assigned in the requested fields

  • Create the Template

  • Create Target definition

  • Fill in the Dependency

The complete implementation plan, the template itself and an example of the generated code of this template can be found in the attached PDF

VSS - SCD2 Dimension on hub.pdf
394.89KB

Other examples from the same series:

4