-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add if execute checks to xdb deprecation warnings (#725)
* Add if execute checks to xdb deprecation warnings * Update CHANGELOG.md * Get changelog to reflect reality [skip ci]
- Loading branch information
Showing
2 changed files
with
52 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
12 changes: 8 additions & 4 deletions
12
macros/cross_db_utils/deprecated/xdb_deprecation_warning.sql
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,9 +1,13 @@ | ||
{% macro xdb_deprecation_warning(macro, package, model) %} | ||
{%- set error_message = "Warning: the `" ~ macro ~"` macro is now provided in dbt Core. It is no longer available in dbt_utils and backwards compatibility will be removed in a future version of the package. Use `" ~ macro ~ "` (no prefix) instead. The " ~ package ~ "." ~ model ~ " model triggered this warning." -%} | ||
{%- do exceptions.warn(error_message) -%} | ||
{% if execute %} | ||
{%- set error_message = "Warning: the `" ~ macro ~"` macro is now provided in dbt Core. It is no longer available in dbt_utils and backwards compatibility will be removed in a future version of the package. Use `" ~ macro ~ "` (no prefix) instead. The " ~ package ~ "." ~ model ~ " model triggered this warning." -%} | ||
{%- do exceptions.warn(error_message) -%} | ||
{% endif %} | ||
{% endmacro %} | ||
|
||
{% macro xdb_deprecation_warning_without_replacement(macro, package, model) %} | ||
{%- set error_message = "Warning: the `" ~ macro ~"` macro is deprecated and will be removed in a future version of the package, once equivalent functionality is implemented in dbt Core. The " ~ package ~ "." ~ model ~ " model triggered this warning." -%} | ||
{%- do exceptions.warn(error_message) -%} | ||
{% if execute %} | ||
{%- set error_message = "Warning: the `" ~ macro ~"` macro is deprecated and will be removed in a future version of the package, once equivalent functionality is implemented in dbt Core. The " ~ package ~ "." ~ model ~ " model triggered this warning." -%} | ||
{%- do exceptions.warn(error_message) -%} | ||
{% endif %} | ||
{% endmacro %} |