Support Concatenate SQL in unique_key config
luisleon90 opened this issue · comments
Describe the feature
I would like to be able to use concat SQL syntax to combine multiple columns that act as a surrogate key for a table, similar to how you can for the unique key in a incremental model or snapshot - something like:
unique_key= "col_a||'-'||col_b"
Describe alternatives you've considered
Currently if I want to use audit helper macros on tables that do not have a unique key I must use the surrogate key macro or something similar to actually add this column onto the object so it can be referenced.
Additional context
This feature is not database specific and would match how we handle the unique_key configuration in other parts of dbt for example snapshots & incremental models.
Who will this benefit?
This allows me to more easily work with the audit helper packages by extended use cases to tables with not primary key. This saves me time as a developer since I do not have to actually add the surrogate key to an object in the warehouse.
Are you interested in contributing this feature?
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.