Skip to content

Commit a0c0440

Browse files
authored
Merge pull request #172 from microsoft/v1.8.4
V1.8.4
2 parents adf9f8d + 43a06a9 commit a0c0440

File tree

8 files changed

+16
-18
lines changed

8 files changed

+16
-18
lines changed

dbt/adapters/fabric/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "1.8.3"
1+
version = "1.8.4"

dbt/include/fabric/macros/materializations/snapshots/snapshot.sql

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@
5454
| rejectattr('name', 'equalto', 'dbt_unique_key')
5555
| rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')
5656
| list %}
57-
{% do create_columns(target_relation, missing_columns) %}
57+
{% if missing_columns|length > 0 %}
58+
{{log("Missing columns length is: "~ missing_columns|length)}}
59+
{% do create_columns(target_relation, missing_columns) %}
60+
{% endif %}
5861
{% set source_columns = adapter.get_columns_in_relation(staging_table)
5962
| rejectattr('name', 'equalto', 'dbt_change_type')
6063
| rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')

dbt/include/fabric/macros/materializations/tests/helpers.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% if main_sql.strip().lower().startswith('with') %}
44
{% set testview %}
5-
{{ generate_schema_name('tests_schema') }}.testview_{{ range(1300, 19000) | random }}
5+
{{ config.get('schema') }}.testview_{{ range(1300, 19000) | random }}
66
{% endset %}
77

88
{% set sql = main_sql.replace("'", "''")%}

dev_requirements.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# install latest changes in dbt-core
22
# TODO: how to automate switching from develop to version branches?
3-
git+https://github.com/dbt-labs/dbt-core.git@fc431010ef0bd11ee6a502fc6c9e5e3e75c5d72d#egg=dbt-core&subdirectory=core
4-
git+https://github.com/dbt-labs/dbt-adapters.git@4c289b150853b94beb67921f2a8dd203abe53cbe
5-
git+https://github.com/dbt-labs/dbt-adapters.git@4c289b150853b94beb67921f2a8dd203abe53cbe#subdirectory=dbt-tests-adapter
3+
git+https://github.com/dbt-labs/[email protected]#egg=dbt-core&subdirectory=core
4+
git+https://github.com/dbt-labs/dbt-adapters.git
5+
git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter
6+
git+https://github.com/dbt-labs/dbt-common.git
67

78
pytest==8.0.1
89
twine==5.0.0

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ def run(self):
6868
install_requires=[
6969
"pyodbc>=4.0.35,<5.2.0",
7070
"azure-identity>=1.12.0",
71-
"dbt-common>=0.1.0a1,<2.0",
72-
"dbt-core>=1.8.0a1",
73-
"dbt-adapters>=0.1.0a1,<2.0",
71+
"dbt-common>=1.0.4,<2.0",
72+
"dbt-core==1.8.0",
73+
"dbt-adapters>=1.1.1,<2.0",
7474
],
7575
cmdclass={
7676
"verify": VerifyVersionCommand,

tests/functional/adapter/test_constraints.py

-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
description: hello
4545
constraints:
4646
- type: not_null
47-
- type: primary_key
4847
- type: unique
4948
- type: check
5049
expression: (id > 0)
@@ -92,7 +91,6 @@
9291
description: hello
9392
constraints:
9493
- type: not_null
95-
- type: primary_key
9694
- type: check
9795
expression: (id > 0)
9896
tests:

tests/functional/adapter/test_dbt_clone.py

-3
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,14 @@ def copy_state(self, project_root):
8484
def run_and_save_state(self, project_root, with_snapshot=False):
8585
results = run_dbt(["seed"])
8686
assert len(results) == 1
87-
assert not any(r.node.deferred for r in results)
8887
results = run_dbt(["run"])
8988
assert len(results) == 2
90-
assert not any(r.node.deferred for r in results)
9189
results = run_dbt(["test"])
9290
assert len(results) == 2
9391

9492
if with_snapshot:
9593
results = run_dbt(["snapshot"])
9694
assert len(results) == 1
97-
assert not any(r.node.deferred for r in results)
9895

9996
# copy files
10097
self.copy_state(project_root)

tests/functional/adapter/test_query_comment.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import json
2+
13
from dbt.tests.adapter.query_comment.test_query_comment import (
24
BaseEmptyQueryComments,
35
BaseMacroArgsQueryComments,
@@ -6,8 +8,6 @@
68
BaseNullQueryComments,
79
BaseQueryComments,
810
)
9-
from dbt.version import __version__ as dbt_version
10-
import json
1111

1212

1313
# Tests #
@@ -20,11 +20,10 @@ class TestMacroQueryComments(BaseMacroQueryComments):
2020

2121

2222
class TestMacroArgsQueryComments(BaseMacroArgsQueryComments):
23-
def test_matches_comment(self, project) -> bool:
23+
def test_matches_comment(self, project):
2424
logs = self.run_get_json()
2525
expected_dct = {
2626
"app": "dbt++",
27-
"dbt_version": dbt_version,
2827
"macro_version": "0.1.0",
2928
"message": f"blah: {project.adapter.config.target_name}",
3029
}

0 commit comments

Comments
 (0)