-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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-2519] [CT-2442] [Bug] Foreign key constraint templating #7417
Closed
Tracked by
#7372
jtcohen6 opened this issue
Apr 20, 2023
· 0 comments
· Fixed by #7512, dbt-labs/dbt-bigquery#698, dbt-labs/dbt-snowflake#596, dbt-labs/dbt-redshift#430 or dbt-labs/dbt-spark#750
Closed
Tracked by
#7372
[CT-2519] [CT-2442] [Bug] Foreign key constraint templating #7417
jtcohen6 opened this issue
Apr 20, 2023
· 0 comments
· Fixed by #7512, dbt-labs/dbt-bigquery#698, dbt-labs/dbt-snowflake#596, dbt-labs/dbt-redshift#430 or dbt-labs/dbt-spark#750
Labels
bug
Something isn't working
jira
model_contracts
Team:Adapters
Issues designated for the adapter area of the code
Milestone
Comments
jtcohen6
added
bug
Something isn't working
Team:Adapters
Issues designated for the adapter area of the code
model_contracts
labels
Apr 20, 2023
github-actions
bot
changed the title
[Bug] Foreign key constraint templating
[CT-2442] [Bug] Foreign key constraint templating
Apr 20, 2023
github-actions
bot
changed the title
[CT-2442] [Bug] Foreign key constraint templating
[CT-2519] [CT-2442] [Bug] Foreign key constraint templating
May 3, 2023
6 tasks
This was referenced May 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
jira
model_contracts
Team:Adapters
Issues designated for the adapter area of the code
The most common syntax I see is:
references {expression}
foreign key {column_list} references {expression}
Right now we're templating this out as
foreign_key
, instead ofreferences
.Docs:
FWIW on BigQuery it does seem to be
foreign_key
and NOTreferences
: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#syntax_2If we were to take FK constraints more seriously, we're missing a pretty important ingredient, which is the ability to include & template
ref
inside theexpression
field — or providing more structure, i.e.Per #6754 (comment), we kicked that out of scope for v1.5, and we're unlikely to prioritize it while this remains a metadata-only (nonfunctional & unenforceable) feature on the majority of data platforms.
The text was updated successfully, but these errors were encountered: