Skip to content

Commit

Permalink
Remove get_tables_by_prefix and union_tables (deprecated in v0.2.4 / …
Browse files Browse the repository at this point in the history
…Dec 2019)
  • Loading branch information
clrcrl committed Aug 20, 2020
1 parent fecd4a4 commit 82cf0cb
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,6 @@ Usage:
...
```
#### get_relations_by_prefix
> This replaces the `get_tables_by_prefix` macro. Note that the `get_tables_by_prefix` macro will
be deprecated in a future release of this package.

Returns a list of [Relations](https://docs.getdbt.com/docs/writing-code-in-dbt/class-reference/#relation)
that match a given prefix, with an optional exclusion pattern. It's particularly
handy paired with `union_relations`.
Expand Down Expand Up @@ -516,8 +513,6 @@ from {{ref('my_model')}}
```

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

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

This file was deleted.

12 changes: 0 additions & 12 deletions macros/sql/get_relations_by_prefix.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,3 @@
{%- endif -%}

{% endmacro %}

{% macro get_tables_by_prefix(schema, prefix, exclude='', database=target.database) %}
{%- set error_message = '
Warning: the `get_tables_by_prefix` macro is no longer supported and will be deprecated in a future release of dbt-utils. \
Use the `get_relations_by_prefix` macro instead. \
The {}.{} model triggered this warning. \
'.format(model.package_name, model.name) -%}
{%- do exceptions.warn(error_message) -%}

{{ return(dbt_utils.get_relations_by_prefix(schema, prefix, exclude, database)) }}

{% endmacro %}
12 changes: 0 additions & 12 deletions macros/sql/union.sql
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,3 @@
{%- endfor -%}

{%- endmacro -%}

{%- macro union_tables(tables, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_table') -%}
{%- set error_message = '
Warning: the `union_tables` macro is no longer supported and will be deprecated in a future release of dbt-utils. \
Use the `union_relations` macro instead. \
The {}.{} model triggered this warning. \
'.format(model.package_name, model.name) -%}
{%- do exceptions.warn(error_message) -%}

{{ return(dbt_utils.union_relations(tables, column_override, include, exclude, source_column_name)) }}

{%- endmacro -%}

0 comments on commit 82cf0cb

Please sign in to comment.