forked from dbt-labs/dbt-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 04536a1 Author: Joel Labes <[email protected]> Date: Wed Nov 23 08:30:34 2022 +1300 Merge main into utils-v1 (dbt-labs#726) * Feature/safe divide (dbt-labs#697) * add safe_divide documentation * add safe_divide macro * add integration test for safe_divide macro * moved macro and documentation to new SQL generator section Co-authored-by: Grace Goheen <[email protected]> * Revert "Feature/safe divide (dbt-labs#697)" (dbt-labs#702) This reverts commit f368cec. * Quick nitpicks (dbt-labs#718) I was doing some studying on these and spotted some stuff. One verb conjugation and a consistency in macro description Co-authored-by: deanna-minnick <[email protected]> Co-authored-by: Grace Goheen <[email protected]> Co-authored-by: ian-fahey-dbt <[email protected]> commit 2703459 Author: fivetran-catfritz <[email protected]> Date: Tue Nov 1 20:26:17 2022 -0500 Slugify for snowflake (dbt-labs#707) commit 17b017d Merge: 31c503d b08f7bb Author: Joel Labes <[email protected]> Date: Thu Oct 27 16:51:56 2022 +1300 Merge branch 'heads/0.9.3' into utils-v1 commit b08f7bb Author: Joel Labes <[email protected]> Date: Thu Oct 27 15:28:55 2022 +1300 Wrap xdb warnings in if execute block commit 586f278 Author: Joel Labes <[email protected]> Date: Thu Oct 27 15:27:57 2022 +1300 Change deprecation resolution advice commit 4fae6c5 Author: Joel Labes <[email protected]> Date: Thu Oct 27 15:19:27 2022 +1300 Switch to dbt.escape_single_quotes
- Loading branch information
Showing
5 changed files
with
22 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
{% if dbt_utils.slugify('!Hell0 world-hi') == 'hell0_world_hi' %} | ||
{# Return 0 rows for the test to pass #} | ||
select 1 as col_name {{ limit_zero() }} | ||
{% else %} | ||
{# Return >0 rows for the test to fail #} | ||
select 1 as col_name | ||
{% endif %} | ||
with comparisons as ( | ||
select '{{ dbt_utils.slugify("!Hell0 world-hi") }}' as output, 'hell0_world_hi' as expected | ||
union all | ||
select '{{ dbt_utils.slugify("0Hell0 world-hi") }}' as output, '_0hell0_world_hi' as expected | ||
) | ||
|
||
select * | ||
from comparisons | ||
where output != expected |
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,4 +1,6 @@ | ||
{% 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 %} |
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