diff --git a/dev-requirements.txt b/dev-requirements.txt index 560176381..f8446cfd3 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ # install latest changes in dbt-core # TODO: how to automate switching from develop to version branches? -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-tests-adapter&subdirectory=tests/adapter +git+https://github.com/dbt-labs/dbt-core.git@jerco/7370-model-contracts-respect-quoting#egg=dbt-core&subdirectory=core +git+https://github.com/dbt-labs/dbt-core.git@jerco/7370-model-contracts-respect-quoting#egg=dbt-tests-adapter&subdirectory=tests/adapter # if version 1.x or greater -> pin to major version # if version 0.x -> pin to minor diff --git a/tests/functional/adapter/test_constraints.py b/tests/functional/adapter/test_constraints.py index 99ba8ec33..e9f9550ae 100644 --- a/tests/functional/adapter/test_constraints.py +++ b/tests/functional/adapter/test_constraints.py @@ -9,6 +9,7 @@ BaseIncrementalConstraintsRuntimeDdlEnforcement, BaseIncrementalConstraintsRollback, BaseModelConstraintsRuntimeEnforcement, + BaseConstraintQuotedColumn, ) @@ -126,3 +127,23 @@ def expected_sql(self): ) as model_subq ); """ + + +class TestSnowflakeConstraintQuotedColumn(BaseConstraintQuotedColumn): + @pytest.fixture(scope="class") + def expected_sql(self): + return """ +create or replace transient table ( + id integer not null, + "from" text not null, + date_day text +) as ( + select id, "from", date_day + from ( + select + 'blue' as "from", + 1 as id, + '2019-01-01' as date_day + ) as model_subq +); +"""