Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-2220] [Snowflake] Add model-level constraints to get_columns_spec_ddl #493

Closed
Tracked by #6747
MichelleArk opened this issue Feb 28, 2023 · 0 comments · Fixed by #552
Closed
Tracked by #6747

[CT-2220] [Snowflake] Add model-level constraints to get_columns_spec_ddl #493

MichelleArk opened this issue Feb 28, 2023 · 0 comments · Fixed by #552

Comments

@MichelleArk
Copy link
Contributor

MichelleArk commented Feb 28, 2023

Core issue: dbt-labs/dbt-core#6754

Snowflake supports not_null, primary_key, foreign_key, and unique constraints:

constraint type support
not_null enforced
primary_key not enforced
foreign_key not enforced
unique not enforced
check not supported

constraints specified at the model-level should be rendered to the column spec ddl after column-level constraints are rendered: https://github.com/dbt-labs/dbt-snowflake/blob/main/dbt/include/snowflake/macros/utils/get_columns_spec_ddl.sql#L10-L11.

Constraint docs: https://docs.snowflake.com/en/sql-reference/sql/create-table-constraint

@github-actions github-actions bot changed the title [Snowflake] Add model-level constraints to get_columns_spec_ddl [CT-2220] [Snowflake] Add model-level constraints to get_columns_spec_ddl Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants