Skip to content

Commit 7c11123

Browse files
authored
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]
1 parent 064c2ab commit 7c11123

File tree

2 files changed

+52
-14
lines changed

2 files changed

+52
-14
lines changed

CHANGELOG.md

+44-10
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,53 @@
88
## Contributors:
99
--->
1010

11-
# Unreleased
11+
# 0.9.5
12+
## Fixes
13+
- Stop showing cross-db deprecation warnings for macros who have already been migrated ([#725](https://github.com/dbt-labs/dbt-utils/pull/725))
14+
15+
## 0.9.3 and 0.9.4
16+
Rolled back due to accidental incompatibilities
17+
# dbt-utils 0.9.2
18+
## What's Changed
19+
* Remove unnecessary generated new lines in `star` by @courentin in https://github.com/dbt-labs/dbt-utils/pull/651
20+
* fix: Actually suppress `union_relations` source_column_name when passing `none` by @kmclaugh in https://github.com/dbt-labs/dbt-utils/pull/661
21+
* Make `mutually_exclusive_ranges`' test deterministic by adding `upper_bound_column` to `order by` clause by @sfc-gh-ancoleman in https://github.com/dbt-labs/dbt-utils/pull/660
22+
* update union_relations to use core string literal macro by @dave-connors-3 in https://github.com/dbt-labs/dbt-utils/pull/665
23+
* Add where clause example to get_column_values documentation by @arsenkhy in https://github.com/dbt-labs/dbt-utils/pull/623
24+
25+
## New Contributors
26+
* @courentin made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/651
27+
* @kmclaugh made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/661
28+
* @sfc-gh-ancoleman made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/660
29+
* @dave-connors-3 made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/665
30+
* @arsenkhy made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/623
31+
32+
# dbt-utils 0.9.1
33+
## Fixes
34+
- Remove cross-db dbt_utils references by @clausherther in #650
1235

13-
## New features
14-
- New feature to omit the `source_column_name` column on the `union_relations` macro ([#331](https://github.com/dbt-labs/dbt-utils/issues/331), [#624](https://github.com/dbt-labs/dbt-utils/pull/624))
1536

16-
## Fixes
17-
- Better handling of whitespaces in the star macro ([#651](https://github.com/dbt-labs/dbt-utils/pull/651))
18-
- Fix to correct behavior in `mutually_exclusive_ranges` test in certain situations when `zero_length_range_allowed: true` and multiple ranges in a partition have the same value for `lower_bound_column`. ([[#659](https://github.com/dbt-labs/dbt-utils/issues/659)], [#660](https://github.com/dbt-labs/dbt-utils/pull/660))
37+
# dbt-utils 0.9.0
38+
## Changed functionality
39+
* 🚨 (Almost all) cross-db macros are now implemented in dbt Core instead of dbt-utils. A backwards-compatibility layer remains for now and will be removed in dbt utils 1.0 later this year. Completed by @dbeatty10 and @jtcohen6 in https://github.com/dbt-labs/dbt-utils/pull/597, https://github.com/dbt-labs/dbt-utils/pull/586 and https://github.com/dbt-labs/dbt-utils/pull/615
40+
* See #487 for further discussion on the backstory
41+
* If you are a package maintainer with a dependency on these macros, prepare for their removal by switching to `{{ dbt.some_macro() }}`. Refer to [#package-ecosystem in the Community Slack](https://getdbt.slack.com/archives/CU4MRJ7QB/p1658467817852129) for further assistance
42+
* Feature: Add option to remove the `source_column_name` on the `union_relations` macro by @christineberger in https://github.com/dbt-labs/dbt-utils/pull/624
1943

20-
## Contributors:
21-
- [@christineberger](https://github.com/christineberger) (#624)
22-
- [@courentin](https://github.com/courentin) (#651)
23-
- [@sfc-gh-ancoleman](https://github.com/sfc-gh-ancoleman) (#660)
44+
## Fixes
45+
* Use adapter.quote() instead of hardcoded BQ quoting for get_table_types_sql by @alla-bongard in https://github.com/dbt-labs/dbt-utils/pull/636
46+
47+
## Documentation
48+
* standardize yml indentation under the 'models:' line on the README by @leoebfolsom in https://github.com/dbt-labs/dbt-utils/pull/613
49+
* Use MADR 3.0.0 for formatting decision records by @dbeatty10 in https://github.com/dbt-labs/dbt-utils/pull/614
50+
* Docs cleanup by @dbeatty10 in https://github.com/dbt-labs/dbt-utils/pull/620
51+
* Add not_accepted_values to README ToC by @david-beallor in https://github.com/dbt-labs/dbt-utils/pull/646
52+
53+
# New Contributors
54+
* @leoebfolsom made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/613
55+
* @christineberger made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/624
56+
* @alla-bongard made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/636
57+
* @david-beallor made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/646
2458

2559
# dbt-utils v0.8.6
2660

Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{% macro xdb_deprecation_warning(macro, package, model) %}
2-
{%- 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." -%}
3-
{%- do exceptions.warn(error_message) -%}
2+
{% if execute %}
3+
{%- 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." -%}
4+
{%- do exceptions.warn(error_message) -%}
5+
{% endif %}
46
{% endmacro %}
57

68
{% macro xdb_deprecation_warning_without_replacement(macro, package, model) %}
7-
{%- 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." -%}
8-
{%- do exceptions.warn(error_message) -%}
9+
{% if execute %}
10+
{%- 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." -%}
11+
{%- do exceptions.warn(error_message) -%}
12+
{% endif %}
913
{% endmacro %}

0 commit comments

Comments
 (0)