Hi,
I am a new user of dbt. If you could assist me on some doubts I will be so appreciated.
I need to define constraints at table, but I could not find any way to do it through dbt. I would like to do something like below:
ALTER TABLE dim_customers
ADD CONSTRAINT PK_customer_id PRIMARY KEY (‘company_id’, ‘customer_id’)
Alter table function does not work for dbt. This should be done in config block, right?
If I define them in yml file, it does not appear as primary key at dim_customers table in Snowflake. It only is mentioned at documentation.
Like below:
columns:
- name: company_id
config:
primary_key: true
description: The primary.
Also I need to see descriptions of the columns at the table in Snowflake. Once I add descriptions in yml file they only appear in documentation, but they do not appear at the table in Snowflake likewise primary key.
Could you please support me in this?
Thanks,
Regards
Hazal