Skip to content

Commit f2a4806

Browse files
authored
Merge pull request #141 from dbt-msft/v0.20.0
v0.20.0
2 parents 75ff846 + 45c3f87 commit f2a4806

File tree

8 files changed

+27
-18
lines changed

8 files changed

+27
-18
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242
- checkout
4343
- run: &install-dbt-sqlserver
4444
name: "install dbt-sqlserver"
45-
command: pip install .
45+
command: |
46+
pip install .
4647
- run:
4748
name: wait for SQL Server container to set up
4849
command: sleep 30

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
### v0.20.0
44

5-
#### features
5+
#### features:
66

7+
- dbt-sqlserver will now work with dbt `v0.20.0`. Please see dbt's [upgrading to `v0.20.0` docs](https://docs.getdbt.com/docs/guides/migration-guide/upgrading-to-0-20-0) for more info.
78
- users can now declare a custom `max_batch_size` in the project configuration to set the batch size used by the seed file loader. [#127](https://github.com/dbt-msft/dbt-sqlserver/issues/127) and [#151](https://github.com/dbt-msft/dbt-sqlserver/pull/151) thanks [@jacobm001](https://github.com/jacobm001)
89

910
#### under the hood
1011

1112
- `sqlserver__load_csv_rows` now has a safety provided by `calc_batch_size()` to ensure the insert statements won't exceed SQL Server's 2100 parameter limit. [#127](https://github.com/dbt-msft/dbt-sqlserver/issues/127) and [#151](https://github.com/dbt-msft/dbt-sqlserver/pull/151) thanks [@jacobm001](https://github.com/jacobm001)
12-
13+
- switched to using a `MANIFEST.in` to declare which files should be included
14+
- updated `pyodbc` and `azure-identity` dependencies to their latest versions
1315
### v0.19.2
1416

1517
#### fixes

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recursive-include dbt/include *.sql *.yml *.md

dbt/adapters/sqlserver/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = '0.19.2'
1+
version = '0.20.0'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% macro sqlserver__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}
2+
select
3+
{{ fail_calc }} as failures,
4+
case when {{ fail_calc }} {{ warn_if }}
5+
then 'true' else 'false' end as should_warn,
6+
case when {{ fail_calc }} {{ error_if }}
7+
then 'true' else 'false' end as should_error
8+
from (
9+
{{ main_sql }}
10+
{{ "limit " ~ limit if limit != none }}
11+
) dbt_internal_test
12+
{%- endmacro %}

dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
black==20.8b1
2-
pytest-dbt-adapter==0.5.1
2+
pytest-dbt-adapter~=0.5.1
33
pytest==6.2.2
44
tox==3.2.0
55
flake8==3.5.0

setup.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _dbt_sqlserver_version():
2828
package_version = _dbt_sqlserver_version()
2929
description = """A sqlserver adapter plugin for dbt (data build tool)"""
3030

31-
dbt_version = '0.19'
31+
dbt_version = '0.20'
3232
# the package version should be the dbt version, with maybe some things on the
3333
# ends of it. (0.18.1 vs 0.18.1a1, 0.18.1.1, ...)
3434
if not package_version.startswith(dbt_version):
@@ -48,17 +48,10 @@ def _dbt_sqlserver_version():
4848
author_email="[email protected]",
4949
url="https://github.com/mikaelene/dbt-sqlserver",
5050
packages=find_packages(),
51-
package_data={
52-
"dbt": [
53-
"include/sqlserver/dbt_project.yml",
54-
"include/sqlserver/macros/*.sql",
55-
"include/sqlserver/macros/**/*.sql",
56-
"include/sqlserver/macros/**/**/*.sql",
57-
]
58-
},
51+
include_package_data=True,
5952
install_requires=[
60-
"dbt-core~=0.19.0",
61-
"pyodbc>=4.0.27",
62-
"azure-identity>=1.4.0",
53+
"dbt-core~=0.20.0",
54+
"pyodbc~=4.0.31",
55+
"azure-identity>=1.6.0",
6356
]
6457
)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ passenv =
1010
DBT_AZURESQL_UID
1111
deps =
1212
pytest~=6.2.2
13-
pytest-dbt-adapter~=0.4.0
13+
pytest-dbt-adapter~=0.5.0

0 commit comments

Comments
 (0)