Skip to content

Commit 82cf0cb

Browse files
committed
Remove get_tables_by_prefix and union_tables (deprecated in v0.2.4 / Dec 2019)
1 parent fecd4a4 commit 82cf0cb

File tree

4 files changed

+0
-33
lines changed

4 files changed

+0
-33
lines changed

README.md

-5
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,6 @@ Usage:
442442
...
443443
```
444444
#### get_relations_by_prefix
445-
> This replaces the `get_tables_by_prefix` macro. Note that the `get_tables_by_prefix` macro will
446-
be deprecated in a future release of this package.
447-
448445
Returns a list of [Relations](https://docs.getdbt.com/docs/writing-code-in-dbt/class-reference/#relation)
449446
that match a given prefix, with an optional exclusion pattern. It's particularly
450447
handy paired with `union_relations`.
@@ -516,8 +513,6 @@ from {{ref('my_model')}}
516513
```
517514

518515
#### union_relations ([source](macros/sql/union.sql))
519-
> This replaces the `union_tables` macro. Note that the `union_tables` macro will
520-
be deprecated in a future release of this package.
521516

522517
This macro unions together an array of [Relations](https://docs.getdbt.com/docs/writing-code-in-dbt/class-reference/#relation),
523518
even when columns have differing orders in each Relation, and/or some columns are

integration_tests/models/sql/test_get_tables_by_prefix_and_union.sql

-4
This file was deleted.

macros/sql/get_relations_by_prefix.sql

-12
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,3 @@
2121
{%- endif -%}
2222

2323
{% endmacro %}
24-
25-
{% macro get_tables_by_prefix(schema, prefix, exclude='', database=target.database) %}
26-
{%- set error_message = '
27-
Warning: the `get_tables_by_prefix` macro is no longer supported and will be deprecated in a future release of dbt-utils. \
28-
Use the `get_relations_by_prefix` macro instead. \
29-
The {}.{} model triggered this warning. \
30-
'.format(model.package_name, model.name) -%}
31-
{%- do exceptions.warn(error_message) -%}
32-
33-
{{ return(dbt_utils.get_relations_by_prefix(schema, prefix, exclude, database)) }}
34-
35-
{% endmacro %}

macros/sql/union.sql

-12
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,3 @@
8383
{%- endfor -%}
8484

8585
{%- endmacro -%}
86-
87-
{%- macro union_tables(tables, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_table') -%}
88-
{%- set error_message = '
89-
Warning: the `union_tables` macro is no longer supported and will be deprecated in a future release of dbt-utils. \
90-
Use the `union_relations` macro instead. \
91-
The {}.{} model triggered this warning. \
92-
'.format(model.package_name, model.name) -%}
93-
{%- do exceptions.warn(error_message) -%}
94-
95-
{{ return(dbt_utils.union_relations(tables, column_override, include, exclude, source_column_name)) }}
96-
97-
{%- endmacro -%}

0 commit comments

Comments
 (0)