Skip to content

Commit

Permalink
Primary and foreign key constraints are not enforced in BigQuery (#1019)
Browse files Browse the repository at this point in the history
* primary and foreign key constraints are not enforced in BigQuery

* Changelog entry

---------

Co-authored-by: Matthew McKnight <[email protected]>
  • Loading branch information
dbeatty10 and McKnight-42 authored Jan 23, 2024
1 parent e86609a commit 70b7445
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20231116-062142.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Primary and foreign key constraints are not enforced in BigQuery
time: 2023-11-16T06:21:42.935367-08:00
custom:
Author: dbeatty10
Issue: "1018"
4 changes: 2 additions & 2 deletions dbt/adapters/bigquery/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ class BigQueryAdapter(BaseAdapter):
ConstraintType.check: ConstraintSupport.NOT_SUPPORTED,
ConstraintType.not_null: ConstraintSupport.ENFORCED,
ConstraintType.unique: ConstraintSupport.NOT_SUPPORTED,
ConstraintType.primary_key: ConstraintSupport.ENFORCED,
ConstraintType.foreign_key: ConstraintSupport.ENFORCED,
ConstraintType.primary_key: ConstraintSupport.NOT_ENFORCED,
ConstraintType.foreign_key: ConstraintSupport.NOT_ENFORCED,
}

def __init__(self, config, mp_context: SpawnContext) -> None:
Expand Down

0 comments on commit 70b7445

Please sign in to comment.