Skip to content

Commit 212b9c4

Browse files
authored
Merge pull request #118 from dbt-msft/fix_bug_snapshots
Fix for bugs in snapshots
2 parents a298e8b + 24182fb commit 212b9c4

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### v0.19.0.2
4+
5+
#### fixes
6+
- solved a bug in snapshots introduced in v0.19.0. Fixes: [#108](https://github.com/dbt-msft/dbt-sqlserver/issues/108), [#117](https://github.com/dbt-msft/dbt-sqlserver/issues/117).
7+
8+
39
### v0.19.0.1
410

511
#### fixes

dbt/include/sqlserver/macros/adapters.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
{% endmacro %}
174174

175175
{% macro sqlserver__current_timestamp() -%}
176-
getdate()
176+
SYSDATETIME()
177177
{%- endmacro %}
178178

179179
{% macro sqlserver__get_columns_in_relation(relation) -%}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% macro sqlserver__snapshot_hash_arguments(args) %}
22
CONVERT(VARCHAR(32), HashBytes('MD5', {% for arg in args %}
3-
coalesce(CONVERT(varchar, {{ arg }}, 121), '') {% if not loop.last %} + '|' + {% endif %}
3+
coalesce(cast({{ arg }} as varchar(max)), '') {% if not loop.last %} + '|' + {% endif %}
44
{% endfor %}), 2)
55
{% endmacro %}
66

0 commit comments

Comments
 (0)