Skip to content

Commit 09b5e02

Browse files
authored
Merge pull request #96 from dbt-msft/v0.19.0_for_real
V0.19.0 for real
2 parents 3fd76f6 + 385cae9 commit 09b5e02

File tree

9 files changed

+101
-81
lines changed

9 files changed

+101
-81
lines changed

CHANGELOG.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Changelog
2+
3+
### v0.19.0
4+
5+
#### New Features:
6+
- dbt-sqlserver's snapshotting now 100% aligneed logically to dbt's snapshotting behavior! Users can now snapshot 'hard-deleted' record as mentioned in the [dbt v0.19.0 release notes](https://github.com/fishtown-analytics/dbt/releases/tag/v0.19.0). An added benefit is that it makes maintaining `dbt-sqlserver` by decreasing code footprint. [#81](https://github.com/dbt-msft/dbt-sqlserver/pull/81) [fishtown-analytics/dbt#3003](https://github.com/fishtown-analytics/dbt/issues/3003)
7+
#### Fixes:
8+
- small snapshot bug addressed via [#81](https://github.com/dbt-msft/dbt-sqlserver/pull/81)
9+
- support for clustered columnstore index creation pre SQL Server 2016. [#88](https://github.com/dbt-msft/dbt-sqlserver/pull/88) thanks [@alangsbo](https://github.com/alangsbo)
10+
- support for scenarios where the target db's collation is different than the server's [#87](https://github.com/dbt-msft/dbt-sqlserver/pull/87) [@alangsbo](https://github.com/alangsbo)
11+
12+
#### Under the hood:
13+
- This adapter has separate CI tests to ensure all the connection methods are working as they should [#75](https://github.com/dbt-msft/dbt-sqlserver/pull/75)
14+
15+
### v0.18.1
16+
#### New Features:
17+
Adds support for:
18+
- SQL Server down to version 2012
19+
- authentication via:
20+
- Azure CLI (see #71, thanks @JCZuurmond !), and
21+
- MSFT ODBC Active Directory options (#53 #55 #58 thanks to @NandanHegde15 and @alieus)
22+
- using a named instance (#51 thanks @alangsbo)
23+
- Adds support down to SQL Server 2012
24+
- The adapter is now automatically tested with Fishtowns official adapter-tests to increase stability when making
25+
changes and upgrades to the adapter.
26+
27+
#### Fixes:
28+
- Fix for lack of precision in the snapshot check strategy. Previously when executing two check snapshots the same
29+
second, there was inconsistent data as a result. This was mostly noted when running the automatic adapter tests.
30+
NOTE: This fix will create a new snapshot version in the target table
31+
on first run after upgrade.
32+
33+
### v0.18.0.1
34+
#### New Features:
35+
- Adds support for Azure Active Directory as authentication provider
36+
37+
#### Fixes:
38+
- Fix for lack of precision in the snapshot check strategy. (#74 and #56 thanks @qed) Previously when executing two check snapshots the same second, there was inconsistent data as a result. This was mostly noted when running the automatic adapter tests.
39+
NOTE: This fix will create a new snapshot version in the target table
40+
on first run after upgrade.
41+
- #52 Fix deprecation warning (Thanks @jnoynaert)
42+
43+
#### Testing
44+
- The adapter is now automatically tested with Fishtowns official adapter-tests to increase stability when making changes and upgrades to the adapter. (#62 #64 #69 #74)
45+
- We are also now testing specific target configs to make the devs more confident that everything is in working order (#75)
46+
47+
### v0.18.0
48+
#### New Features:
49+
- Adds support for dbt v0.18.0
50+
51+
### v0.15.3.1
52+
53+
#### Fixes:
54+
- Snapshots did not work on dbt v0.15.1 to v0.15.3
55+
56+
### v0.15.3
57+
58+
#### Fixes:
59+
- Fix output of sql in the log files.
60+
- Limited the version of dbt to 0.15, since later versions are unsupported.
61+
62+
### v0.15.2
63+
64+
#### Fixes:
65+
- Fixes an issue with clustered columnstore index not beeing created.
66+
67+
68+
### v0.15.1
69+
#### New Features:
70+
- Ability to define an index in a poosthook
71+
72+
#### Fixes:
73+
- Previously when a model run was interupted unfinished models prevented the next run and you had to manually delete them. This is now fixed so that unfinished models will be deleted on next run.
74+
75+
### v0.15.0.1
76+
Fix release for v0.15.0
77+
#### Fixes:
78+
- Setting the port had no effect. Issue #9
79+
- Unable to generate docs. Issue #12
80+
81+
### v0.15.0
82+
Requires dbt v0.15.0 or greater
83+
84+
### pre v0.15.0
85+
Requires dbt v0.14.x

README.md

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -183,74 +183,4 @@ Example of applying Unique clustered index on two columns, Ordinary index on one
183183

184184
## Changelog
185185

186-
### v0.18.1
187-
#### New Features:
188-
Adds support for:
189-
- SQL Server down to version 2012
190-
- authentication via:
191-
- Azure CLI (see #71, thanks @JCZuurmond !), and
192-
- MSFT ODBC Active Directory options (#53 #55 #58 thanks to @NandanHegde15 and @alieus)
193-
- using a named instance (#51 thanks @alangsbo)
194-
- Adds support down to SQL Server 2012
195-
- The adapter is now automatically tested with Fishtowns official adapter-tests to increase stability when making
196-
changes and upgrades to the adapter.
197-
198-
#### Fixes:
199-
- Fix for lack of precision in the snapshot check strategy. Previously when executing two check snapshots the same
200-
second, there was inconsistent data as a result. This was mostly noted when running the automatic adapter tests.
201-
NOTE: This fix will create a new snapshot version in the target table
202-
on first run after upgrade.
203-
204-
### v0.18.0.1
205-
#### New Features:
206-
- Adds support for Azure Active Directory as authentication provider
207-
208-
#### Fixes:
209-
- Fix for lack of precision in the snapshot check strategy. (#74 and #56 thanks @qed) Previously when executing two check snapshots the same second, there was inconsistent data as a result. This was mostly noted when running the automatic adapter tests.
210-
NOTE: This fix will create a new snapshot version in the target table
211-
on first run after upgrade.
212-
- #52 Fix deprecation warning (Thanks @jnoynaert)
213-
214-
#### Testing
215-
- The adapter is now automatically tested with Fishtowns official adapter-tests to increase stability when making changes and upgrades to the adapter. (#62 #64 #69 #74)
216-
- We are also now testing specific target configs to make the devs more confident that everything is in working order (#75)
217-
218-
### v0.18.0
219-
#### New Features:
220-
- Adds support for dbt v0.18.0
221-
222-
### v0.15.3.1
223-
224-
#### Fixes:
225-
- Snapshots did not work on dbt v0.15.1 to v0.15.3
226-
227-
### v0.15.3
228-
229-
#### Fixes:
230-
- Fix output of sql in the log files.
231-
- Limited the version of dbt to 0.15, since later versions are unsupported.
232-
233-
### v0.15.2
234-
235-
#### Fixes:
236-
- Fixes an issue with clustered columnstore index not beeing created.
237-
238-
239-
### v0.15.1
240-
#### New Features:
241-
- Ability to define an index in a poosthook
242-
243-
#### Fixes:
244-
- Previously when a model run was interupted unfinished models prevented the next run and you had to manually delete them. This is now fixed so that unfinished models will be deleted on next run.
245-
246-
### v0.15.0.1
247-
Fix release for v0.15.0
248-
#### Fixes:
249-
- Setting the port had no effect. Issue #9
250-
- Unable to generate docs. Issue #12
251-
252-
### v0.15.0
253-
Requires dbt v0.15.0 or greater
254-
255-
### pre v0.15.0
256-
Requires dbt v0.14.x
186+
See [the changelog](CHANGELOG.md)

dbt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)

dbt/adapters/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = '0.19.0rc2'
1+
version = '0.19.0'

dbt/include/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)

dbt/include/sqlserver/macros/adapters.sql

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@
128128
{%- set cci_name = relation.schema ~ '_' ~ relation.identifier ~ '_cci' -%}
129129
{%- set relation_name = relation.schema ~ '_' ~ relation.identifier -%}
130130
{%- set full_relation = relation.schema ~ '.' ~ relation.identifier -%}
131-
DROP INDEX IF EXISTS {{relation_name}}.{{cci_name}}
131+
if EXISTS (
132+
SELECT * FROM
133+
sys.indexes WHERE name = '{{cci_name}}'
134+
AND object_id=object_id('{{relation_name}}')
135+
)
136+
DROP index {{full_relation}}.{{cci_name}}
132137
CREATE CLUSTERED COLUMNSTORE INDEX {{cci_name}}
133138
ON {{full_relation}}
134139
{% endmacro %}
@@ -193,8 +198,8 @@
193198
UNION ALL
194199
select
195200
ordinal_position,
196-
column_name,
197-
data_type,
201+
column_name collate database_default,
202+
data_type collate database_default,
198203
character_maximum_length,
199204
numeric_precision,
200205
numeric_scale
@@ -219,4 +224,4 @@
219224
{% macro sqlserver__snapshot_string_as_time(timestamp) -%}
220225
{%- set result = "CONVERT(DATETIME2, '" ~ timestamp ~ "')" -%}
221226
{{ return(result) }}
222-
{%- endmacro %}
227+
{%- endmacro %}

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dbt-core==0.19.0rc2
1+
dbt-core==0.19.0
22
pyodbc>=4.0.27
33
azure-identity>=1.4.0
44
black~=20.8b1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def _dbt_sqlserver_version():
5757
]
5858
},
5959
install_requires=[
60-
'dbt-core==0.19.0rc2',
60+
'dbt-core~=0.19.0',
6161
"pyodbc>=4.0.27",
6262
"azure-identity>=1.4.0",
6363
]

0 commit comments

Comments
 (0)