-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from morsapaes/dbt-utils_deprecate
Soft deprecate cross-DB macros
- Loading branch information
Showing
9 changed files
with
72 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: 'materialize_dbt_utils' | ||
version: '0.4.0' | ||
version: '0.5.0' | ||
config-version: 2 | ||
|
||
require-dbt-version: ">=1.0.0" | ||
require-dbt-version: [">=1.3.0", "<2.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
name: 'materialize_dbt_utils_integration_tests' | ||
version: '0.1.0' | ||
version: '0.5.0' | ||
config-version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
{% macro materialize__dateadd(datepart, interval, from_date_or_timestamp) %} | ||
{{ return(dbt_utils.postgres__dateadd(datepart, interval, from_date_or_timestamp)) }} | ||
{% endmacro %} | ||
{{ exceptions.warn( | ||
""" | ||
The dateadd macro has been moved to dbt Core; use the macro directly. | ||
dbt_utils.dateadd is deprecated and will be removed in a future release | ||
of materialize-dbt-utils. | ||
""" | ||
)}} | ||
|
||
{{ return(adapter.dispatch('dateadd','dbt')(datepart, interval, from_date_or_timestamp)) }} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
{% macro materialize__datediff(first_date, second_date, datepart) %} | ||
{{ return(dbt_utils.postgres__datediff(first_date, second_date, datepart)) }} | ||
{% endmacro %} | ||
|
||
{{ exceptions.warn( | ||
""" | ||
The datediff macro has been moved to dbt Core; use the macro directly. | ||
dbt_utils.datediff is deprecated and will be removed in a future release | ||
of materialize-dbt-utils. | ||
""" | ||
)}} | ||
|
||
{{ return(adapter.dispatch('datediff','dbt')(first_date, second_date, datepart)) }} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
{% macro materialize__last_day(date, date_part) %} | ||
{{ return(dbt_utils.postgres__last_day(date, date_part)) }} | ||
{% endmacro %} | ||
|
||
{{ exceptions.warn( | ||
""" | ||
The last_day macro has been moved to dbt Core; use the macro directly. | ||
dbt_utils.last_day is deprecated and will be removed in a future release | ||
of materialize-dbt-utils. | ||
""" | ||
)}} | ||
|
||
{{ return(adapter.dispatch('last_day','dbt')(date, date_part)) }} | ||
{% endmacro %} |