Skip to content

Commit

Permalink
add test for incremental model with unique array
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebruyn committed Jun 6, 2022
1 parent 9588a87 commit 153d80a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/functional/adapter/test_incremental.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import pytest
from dbt.tests.util import run_dbt


class TestAddtionalIncrementalSQLServer:
@pytest.fixture(scope="class")
def models(self):
return {
# https://github.com/dbt-msft/dbt-sqlserver/issues/241
"incremental_unique_array.sql": """
{{
config
(
materialized='incremental'
, unique_key=['A', 'B']
)
}}
WITH CTE AS
(
SELECT 1 AS A, 2 AS B
UNION
SELECT 3 AS A, 4 AS B
)
SELECT
A
, B
FROM
CTE
""",
}

def test_build(self, project):
run_dbt(["build"])

0 comments on commit 153d80a

Please sign in to comment.