Skip to content

Commit

Permalink
Merge pull request #172 from microsoft/v1.8.4
Browse files Browse the repository at this point in the history
V1.8.4
  • Loading branch information
prdpsvs authored May 19, 2024
2 parents adf9f8d + 43a06a9 commit a0c0440
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dbt/adapters/fabric/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "1.8.3"
version = "1.8.4"
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
| rejectattr('name', 'equalto', 'dbt_unique_key')
| rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')
| list %}
{% do create_columns(target_relation, missing_columns) %}
{% if missing_columns|length > 0 %}
{{log("Missing columns length is: "~ missing_columns|length)}}
{% do create_columns(target_relation, missing_columns) %}
{% endif %}
{% set source_columns = adapter.get_columns_in_relation(staging_table)
| rejectattr('name', 'equalto', 'dbt_change_type')
| rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

{% set sql = main_sql.replace("'", "''")%}
Expand Down
7 changes: 4 additions & 3 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# 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@fc431010ef0bd11ee6a502fc6c9e5e3e75c5d72d#egg=dbt-core&subdirectory=core
git+https://github.com/dbt-labs/dbt-adapters.git@4c289b150853b94beb67921f2a8dd203abe53cbe
git+https://github.com/dbt-labs/dbt-adapters.git@4c289b150853b94beb67921f2a8dd203abe53cbe#subdirectory=dbt-tests-adapter
git+https://github.com/dbt-labs/dbt-core.git@v1.8.0#egg=dbt-core&subdirectory=core
git+https://github.com/dbt-labs/dbt-adapters.git
git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter
git+https://github.com/dbt-labs/dbt-common.git

pytest==8.0.1
twine==5.0.0
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def run(self):
install_requires=[
"pyodbc>=4.0.35,<5.2.0",
"azure-identity>=1.12.0",
"dbt-common>=0.1.0a1,<2.0",
"dbt-core>=1.8.0a1",
"dbt-adapters>=0.1.0a1,<2.0",
"dbt-common>=1.0.4,<2.0",
"dbt-core==1.8.0",

This comment has been minimized.

Copy link
@amychen1776

amychen1776 May 20, 2024

This should be "dbt-core>=1.8.0"

"dbt-adapters>=1.1.1,<2.0",
],
cmdclass={
"verify": VerifyVersionCommand,
Expand Down
2 changes: 0 additions & 2 deletions tests/functional/adapter/test_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
description: hello
constraints:
- type: not_null
- type: primary_key
- type: unique
- type: check
expression: (id > 0)
Expand Down Expand Up @@ -92,7 +91,6 @@
description: hello
constraints:
- type: not_null
- type: primary_key
- type: check
expression: (id > 0)
tests:
Expand Down
3 changes: 0 additions & 3 deletions tests/functional/adapter/test_dbt_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,14 @@ def copy_state(self, project_root):
def run_and_save_state(self, project_root, with_snapshot=False):
results = run_dbt(["seed"])
assert len(results) == 1
assert not any(r.node.deferred for r in results)
results = run_dbt(["run"])
assert len(results) == 2
assert not any(r.node.deferred for r in results)
results = run_dbt(["test"])
assert len(results) == 2

if with_snapshot:
results = run_dbt(["snapshot"])
assert len(results) == 1
assert not any(r.node.deferred for r in results)

# copy files
self.copy_state(project_root)
Expand Down
7 changes: 3 additions & 4 deletions tests/functional/adapter/test_query_comment.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import json

from dbt.tests.adapter.query_comment.test_query_comment import (
BaseEmptyQueryComments,
BaseMacroArgsQueryComments,
Expand All @@ -6,8 +8,6 @@
BaseNullQueryComments,
BaseQueryComments,
)
from dbt.version import __version__ as dbt_version
import json


# Tests #
Expand All @@ -20,11 +20,10 @@ class TestMacroQueryComments(BaseMacroQueryComments):


class TestMacroArgsQueryComments(BaseMacroArgsQueryComments):
def test_matches_comment(self, project) -> bool:
def test_matches_comment(self, project):
logs = self.run_get_json()
expected_dct = {
"app": "dbt++",
"dbt_version": dbt_version,
"macro_version": "0.1.0",
"message": f"blah: {project.adapter.config.target_name}",
}
Expand Down

0 comments on commit a0c0440

Please sign in to comment.