ScalefreeCOM / datavault4dbt

Scalefree's dbt package for a Data Vault 2.0 implementation congruent to the original Data Vault 2.0 definition by Dan Linstedt including the Staging Area, DV2.0 main entities, PITs and Snapshot Tables.

Home Page:https://www.scalefree.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PIT table usage

klaus1978 opened this issue · comments

Hi *,

  1. I wonder if I can create a PIT from a SAT that keeps a Dependent Child key?
  2. The Dimension Key is unclear to me. Is it a field coming from the stage model? Or is it creating a "surrogate key" that can be used in the fact/dimension tables afterwards?

Best regards
Klaus

Hi @klaus1978 ,

Thanks for reaching out!

  1. I wonder if I can create a PIT from a SAT that keeps a Dependent Child key?

How have you modeled the Dependant Child Key? There is a page in our Wiki, check it here. If you have followed this implementation, the satellites should not deviate compared to a non-dependant child construct, and can therefore be used in PITs as usual.

  1. The Dimension Key is unclear to me. Is it a field coming from the stage model? Or is it creating a "surrogate key" that can be used in the fact/dimension tables afterwards?

The dimension key is a surrogate key generated in the loading process of a PIT, out of the hash key and the snapshot timestamp. It is used for incremental loading of the PIT. The option in the macro will just influence the name of the new column. Hope this helps for understanding!

Let me know if things are more clear now!

Kind regards,
Tim

Hi @klaus1978,

Were you already able to work through my last post? Let me know if it helped and can be closed, or if you need more input from my side!

Kind regards,
Tim