automate-dv icon indicating copy to clipboard operation
automate-dv copied to clipboard

[FEATURE] Hub natural keys as strings

Open abettsmp opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. The current release of dbtvault creates the natural keys in the hub based on the type exposed from staging view. If the type of this column is an integer (or other restrictive type) then the hub cannot be the target for sources with broader types for their representation of the natural key. As an example first system uses some id type column (integer) for company entities and then you wish to bring in SalesForce company type entities which represents the natural key as a guid (or similar).

Describe the solution you'd like Default hub macro to force all fields of the natural key of a hub to be a string type.

Describe alternatives you've considered If this is an issue for backward compatibility, expose the functionality via a flag/parameter.

Additional context taken from: Cuba, Patrick. The Data Vault Guru: a pragmatic guide on building a data vault (p. 99). Kindle Edition.

Cast to text Statement: all business keys in a data warehouse or a data lake must be stored as text fields.

There are additional, and I believe valid, reasons given in this section.

abettsmp avatar Jul 12 '22 22:07 abettsmp