Skip to content

Commit 077e555

Browse files
authored
Merge pull request #684 from dbt-msft/fix/auto-merge-integration-test
fix: Update model constraints functional test expectation for SQL Server contract INSERT semantics
2 parents e813d7f + 83a8384 commit 077e555

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/functional/adapter/dbt/test_constraints.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def models(self):
472472
@pytest.fixture(scope="class")
473473
def expected_sql(self):
474474
return """
475-
EXEC(' CREATE OR ALTER VIEW <model_identifier> AS -- depends_on: <foreign_key_model_identifier> select ''blue'' as color, 1 as id, ''2019-01-01'' as date_day; ') EXEC(' CREATE TABLE <model_identifier> ( id int not null , color varchar(100), date_day varchar(100) ) INSERT INTO <model_identifier> ( [id], [color], [date_day] ) SELECT [id], [color], [date_day] FROM <model_identifier> ') EXEC('DROP VIEW IF EXISTS <model_identifier>
475+
EXEC(' CREATE OR ALTER VIEW <model_identifier> AS -- depends_on: <foreign_key_model_identifier> select ''blue'' as color, 1 as id, ''2019-01-01'' as date_day; ') EXEC(' CREATE TABLE <model_identifier> ( id int not null , color varchar(100), date_day varchar(100) ) INSERT INTO <model_identifier> WITH (TABLOCK) ( [id], [color], [date_day] ) SELECT [id], [color], [date_day] FROM <model_identifier> ') EXEC('DROP VIEW IF EXISTS <model_identifier>
476476
"""
477477

478478
# EXEC('DROP view IF EXISTS <model_identifier>
@@ -592,7 +592,7 @@ def models(self):
592592
@pytest.fixture(scope="class")
593593
def expected_sql(self):
594594
return """
595-
EXEC(' CREATE OR ALTER VIEW <model_identifier> AS -- depends_on: <foreign_key_model_identifier> select ''blue'' as color, 1 as id, ''2019-01-01'' as date_day; ') EXEC(' CREATE TABLE <model_identifier> ( id int not null , color varchar(100), date_day varchar(100) ) INSERT INTO <model_identifier> ( [id], [color], [date_day] ) SELECT [id], [color], [date_day] FROM <model_identifier> ') EXEC('DROP VIEW IF EXISTS <model_identifier>
595+
EXEC(' CREATE OR ALTER VIEW <model_identifier> AS -- depends_on: <foreign_key_model_identifier> select ''blue'' as color, 1 as id, ''2019-01-01'' as date_day; ') EXEC(' CREATE TABLE <model_identifier> ( id int not null , color varchar(100), date_day varchar(100) ) INSERT INTO <model_identifier> WITH (TABLOCK) ( [id], [color], [date_day] ) SELECT [id], [color], [date_day] FROM <model_identifier> ') EXEC('DROP VIEW IF EXISTS <model_identifier>
596596
"""
597597

598598
def test__model_constraints_ddl(self, project, expected_sql):

0 commit comments

Comments
 (0)