Datavault-UK / automate-dv

A free to use dbt package for creating and loading Data Vault 2.0 compliant Data Warehouses (powered by dbt, an open source data engineering tool, registered trademark of dbt Labs)
https://www.automate-dv.com
Apache License 2.0
511 stars 131 forks source link

Enhanced Hub macros to accommodate for collision keys #104

Closed DVNorbertAcatrinei closed 2 years ago

DVNorbertAcatrinei commented 2 years ago

Added src_ck (collision key) to Hub macros as an optional parameter.

This will create an extra field (e.g. COLLISION_KEY) in the Hub. The field would normally be defined as a derived column in the the primed stage.

Note: Not all tests pass as there are some HKs with null BKs in them that are arriving in the Hub, when they shouldn't.