Skip to content

Commit

Permalink
It doesn't seem like we need our own custom impl of this FK constrain…
Browse files Browse the repository at this point in the history
…t check anymore
  • Loading branch information
jwills committed Sep 26, 2024
1 parent 85862a1 commit b09755f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions dbt/adapters/duckdb/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,6 @@ def get_column_schema_from_query(self, sql: str) -> List[BaseColumn]:
ret.append(DuckDBColumn.create(name, dtype))
return ret

@classmethod
def render_column_constraint(cls, constraint: ColumnLevelConstraint) -> Optional[str]:
"""Render the given constraint as DDL text. Should be overriden by adapters which need custom constraint
rendering."""
if constraint.type == ConstraintType.foreign_key:
# DuckDB doesn't support 'foreign key' as an alias
return f"references {constraint.expression}"
else:
return super().render_column_constraint(constraint)

def _clean_up_temp_relation_for_incremental(self, config):
if self.is_motherduck():
if "incremental" == config.model.get_materialization():
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core
# git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter

dbt-tests-adapter==1.9.2
dbt-tests-adapter==1.10.1

boto3
mypy-boto3-glue
Expand Down

0 comments on commit b09755f

Please sign in to comment.