Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
e879cdd
start off the blueprints
sungchun12 Nov 7, 2022
bd1afc7
Merge branch 'main' of https://github.com/dbt-labs/dbt into feature/d…
sungchun12 Nov 9, 2022
4b2a881
Merge branch 'main' of https://github.com/dbt-labs/dbt into feature/d…
sungchun12 Nov 16, 2022
e8b52e0
test commit
sungchun12 Nov 16, 2022
01a07d3
working snowflake env
sungchun12 Nov 16, 2022
3b31a15
update manifest expectation
sungchun12 Nov 17, 2022
1a1f46a
add error handling
sungchun12 Nov 17, 2022
ebaa54c
clean up language
sungchun12 Nov 17, 2022
fd7a47a
constraints validator
sungchun12 Nov 17, 2022
7e3a9be
cleaner example
sungchun12 Nov 17, 2022
6df02da
better terminal output
sungchun12 Nov 17, 2022
bc3c5bc
add python error handling
sungchun12 Nov 17, 2022
4b901fd
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Nov 17, 2022
e29b571
add to manifest schema
sungchun12 Nov 17, 2022
7d085dc
add to schema config
sungchun12 Nov 17, 2022
e6559d4
clean up comments
sungchun12 Nov 18, 2022
ca89141
backwards compatible nodeconfig
sungchun12 Nov 18, 2022
2c4a4cf
remove comments
sungchun12 Nov 18, 2022
1975c6b
clean up more comments
sungchun12 Nov 18, 2022
f088a03
add changelog
sungchun12 Nov 18, 2022
7421caa
clarify error message
sungchun12 Nov 21, 2022
a7395bb
constraints list type
sungchun12 Nov 21, 2022
5d06524
fix grammar
sungchun12 Nov 21, 2022
380bd96
add global macros
sungchun12 Nov 21, 2022
e6e490d
clearer compile error
sungchun12 Nov 21, 2022
9c498ef
remove comments
sungchun12 Nov 21, 2022
bed1fec
fix tests in this file
sungchun12 Nov 21, 2022
8c466b0
conditional compile errors
sungchun12 Nov 22, 2022
547ad9e
add conditional check in ddl
sungchun12 Nov 22, 2022
52bd35b
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Nov 22, 2022
7582531
add macro to dispatch
sungchun12 Nov 22, 2022
7291094
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Nov 28, 2022
b87f57d
fix regressions in parsed
sungchun12 Nov 28, 2022
5529334
fix regressions in manifest tests
sungchun12 Nov 28, 2022
00f12c2
fix manifest test regressions
sungchun12 Nov 28, 2022
76bf69c
fix test_list regressions
sungchun12 Nov 28, 2022
2e51246
concise data_type terminal error
sungchun12 Nov 29, 2022
5891eb3
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Nov 29, 2022
5d2867f
remove placeholder function
sungchun12 Nov 29, 2022
801b2fd
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Nov 29, 2022
5d59cc1
fix failed regressions finally
sungchun12 Dec 2, 2022
92d2ea7
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Dec 2, 2022
4f747b0
Revert "Merge branch 'main' of https://github.com/dbt-labs/dbt into d…
sungchun12 Dec 2, 2022
eba0b6d
Revert "Revert "Merge branch 'main' of https://github.com/dbt-labs/db…
sungchun12 Dec 2, 2022
ae56da1
remove tmp.csv
sungchun12 Dec 2, 2022
de653e4
template test plans
sungchun12 Dec 5, 2022
cfc53b0
postgres columns spec macro
sungchun12 Dec 5, 2022
fc7230b
schema does not exist error handling
sungchun12 Dec 7, 2022
e1c72ac
update postgres adapter
sungchun12 Dec 7, 2022
b215b6c
remove comments
sungchun12 Dec 7, 2022
d550de4
first passing test
sungchun12 Dec 7, 2022
9d87463
fix postgres macro
sungchun12 Dec 7, 2022
ce85c96
add more passing tests
sungchun12 Dec 7, 2022
49a4120
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Dec 7, 2022
8ffb654
Add generated CLI API docs
FishtownBuildBot Dec 7, 2022
f2f2707
add disabled config test
sungchun12 Dec 7, 2022
096f3fd
column configs match
sungchun12 Dec 7, 2022
eae4e76
Merge branch 'dbt-constraints' of https://github.com/dbt-labs/dbt int…
sungchun12 Dec 7, 2022
b8c3812
test python error handling
sungchun12 Dec 7, 2022
bb1a6c3
adjust macro with rollback
sungchun12 Dec 7, 2022
b6dbcf6
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Dec 7, 2022
751cdc8
start postgres tests
sungchun12 Dec 8, 2022
6bbd797
remove begin commit
sungchun12 Dec 15, 2022
d364eeb
remove begin commit comments
sungchun12 Dec 15, 2022
4a58ece
passing expected compiled sql test
sungchun12 Dec 15, 2022
ac795dd
passing rollback test
sungchun12 Dec 15, 2022
d452cae
update changelog
sungchun12 Dec 16, 2022
baf18f0
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Dec 16, 2022
76c0e4f
fix artifacts regression
sungchun12 Dec 16, 2022
10ab3cb
modularize validator
sungchun12 Dec 18, 2022
6253ed0
PR feedback
sungchun12 Dec 18, 2022
307809d
verify database error occurs
sungchun12 Dec 19, 2022
ab4f396
focus on generic outcomes
sungchun12 Dec 19, 2022
b99e9be
fix global macro
sungchun12 Dec 20, 2022
5935201
rename to constraints_check
sungchun12 Dec 20, 2022
f59c9dd
missed a check rename
sungchun12 Dec 20, 2022
7e28a31
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Dec 24, 2022
3ddd666
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Jan 4, 2023
fabe2ce
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Jan 4, 2023
ffec7d7
validate at parse time
sungchun12 Jan 4, 2023
d338f33
raise error for modelparser only
sungchun12 Jan 5, 2023
e34c467
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Jan 5, 2023
44b2f18
better spacing in terminal output
sungchun12 Jan 5, 2023
17b1f8e
fix test regressions
sungchun12 Jan 6, 2023
c652367
fix manifest test regressions
sungchun12 Jan 6, 2023
f9e020d
these are parsing errors now
sungchun12 Jan 9, 2023
926e555
merge main
sungchun12 Jan 11, 2023
c6bd674
fix tests
sungchun12 Jan 11, 2023
bcc35fc
test passes in json log format
sungchun12 Jan 11, 2023
880ed43
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Jan 13, 2023
426789e
add column compile error handling
sungchun12 Jan 13, 2023
3d61eda
update global macros for column handling
sungchun12 Jan 13, 2023
f163b2c
remove TODO
sungchun12 Jan 13, 2023
bf45243
uppercase columns for consistency
sungchun12 Jan 17, 2023
dbef42b
more specific error handling
sungchun12 Jan 17, 2023
c4de8f3
migrate tests
sungchun12 Jan 17, 2023
ad07ced
clean up core tests
sungchun12 Jan 17, 2023
a501c29
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Jan 17, 2023
59b0298
Update core/dbt/include/global_project/macros/materializations/models…
sungchun12 Jan 17, 2023
e46066b
Revert "Update core/dbt/include/global_project/macros/materialization…
sungchun12 Jan 17, 2023
e80b8cd
update for pre-commit hooks
sungchun12 Jan 17, 2023
257eacd
update for black formatter
sungchun12 Jan 17, 2023
391bd3b
update for black formatter on all files
sungchun12 Jan 17, 2023
0441417
Merge remote-tracking branch 'origin/main' into dbt-constraints
jtcohen6 Jan 23, 2023
e0bcb25
Refactor functional tests
jtcohen6 Jan 30, 2023
dcf7062
Fixup formatting
jtcohen6 Jan 30, 2023
903a2cb
Dave feedback
jtcohen6 Jan 30, 2023
c40ee92
another one - dave
jtcohen6 Jan 30, 2023
111683a
the hits keep coming
jtcohen6 Jan 30, 2023
f8b16bc
adjust whitespace
dave-connors-3 Jan 30, 2023
97f0c6b
Merge branch 'main' of https://github.com/dbt-labs/dbt into dbt-const…
sungchun12 Jan 31, 2023
2a33baf
Light touchup
jtcohen6 Feb 1, 2023
6806a7c
Merge remote-tracking branch 'origin/main' into dbt-constraints
jtcohen6 Feb 1, 2023
1256e7b
Add more flexibility for spark
jtcohen6 Feb 2, 2023
0304dbf
Nearly there for spark
jtcohen6 Feb 2, 2023
b5b1699
Merge main
jtcohen6 Feb 14, 2023
1b0c213
Experiment: column types from empty query
jtcohen6 Jan 20, 2023
64470ca
use get_empty_schema_sql to get column schema from schema yml
MichelleArk Feb 15, 2023
c3e6b7a
Merge branch 'main' into CT-1919/get_column_schema_from_query_macro_core
MichelleArk Feb 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update for black formatter
  • Loading branch information
sungchun12 committed Jan 17, 2023
commit 257eacdfd75545b74c901b46f925f97b2c53a65f
24 changes: 12 additions & 12 deletions tests/adapter/dbt/tests/adapter/constraints/test_constraints.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import pytest
from dbt.exceptions import ParsingError
from dbt.tests.util import (
run_dbt,
get_manifest,
run_dbt_and_capture
)
from dbt.tests.util import run_dbt, get_manifest, run_dbt_and_capture


my_model_sql = """
Expand Down Expand Up @@ -292,7 +288,7 @@ def models(self):

def test__project_error(self, project):
with pytest.raises(ParsingError) as err_info:
run_dbt_and_capture(['run'], expect_pass=False)
run_dbt_and_capture(["run"], expect_pass=False)

error_message_expected = "NOT within a model file(ex: .sql, .py) or `dbt_project.yml`."
assert error_message_expected in str(err_info)
Expand All @@ -307,7 +303,7 @@ def models(self):

def test__model_error(self, project):
with pytest.raises(ParsingError) as err_info:
run_dbt_and_capture(['run'], expect_pass=False)
run_dbt_and_capture(["run"], expect_pass=False)

error_message_expected = "NOT within a model file(ex: .sql, .py) or `dbt_project.yml`."
assert error_message_expected in str(err_info)
Expand All @@ -323,7 +319,7 @@ def models(self):

def test__schema_error(self, project):
with pytest.raises(ParsingError) as err_info:
run_dbt_and_capture(['run'], expect_pass=False)
run_dbt_and_capture(["run"], expect_pass=False)

schema_error_expected = "Schema Error: `yml` configuration does NOT exist"
assert schema_error_expected in str(err_info)
Expand All @@ -339,7 +335,7 @@ def models(self):

def test__config_errors(self, project):
with pytest.raises(ParsingError) as err_info:
run_dbt_and_capture(['run', '-s', 'my_model'], expect_pass=False)
run_dbt_and_capture(["run", "-s", "my_model"], expect_pass=False)

expected_materialization_error = "Materialization Error: {'materialization': 'view'}"
expected_empty_data_type_error = "Columns with `data_type` Blank/Null Errors: {'date_day'}"
Expand All @@ -357,7 +353,7 @@ def models(self):

def test__python_errors(self, project):
with pytest.raises(ParsingError) as err_info:
run_dbt_and_capture(['run', '-s', 'python_model'], expect_pass=False)
run_dbt_and_capture(["run", "-s", "python_model"], expect_pass=False)

expected_python_error = "Language Error: {'language': 'python'}"
assert expected_python_error in str(err_info)
Expand All @@ -374,7 +370,9 @@ def models(self):

def test__my_model_wrong_order(self, project):

results, log_output = run_dbt_and_capture(['--log-format', 'json', 'run', '-s', 'my_model_wrong_order'], expect_pass=False)
results, log_output = run_dbt_and_capture(
["--log-format", "json", "run", "-s", "my_model_wrong_order"], expect_pass=False
)
manifest = get_manifest(project.project_root)
model_id = "model.test.my_model_wrong_order"
my_model_config = manifest.nodes[model_id].config
Expand All @@ -392,7 +390,9 @@ def test__my_model_wrong_order(self, project):

def test__my_model_wrong_name(self, project):

results, log_output = run_dbt_and_capture(['--log-format', 'json', 'run', '-s', 'my_model_wrong_name'], expect_pass=False)
results, log_output = run_dbt_and_capture(
["--log-format", "json", "run", "-s", "my_model_wrong_name"], expect_pass=False
)
manifest = get_manifest(project.project_root)
model_id = "model.test.my_model_wrong_name"
my_model_config = manifest.nodes[model_id].config
Expand Down