diff --git a/README.md b/README.md index 30607d4ef..817183ce7 100644 --- a/README.md +++ b/README.md @@ -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`. @@ -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 diff --git a/integration_tests/models/sql/test_get_tables_by_prefix_and_union.sql b/integration_tests/models/sql/test_get_tables_by_prefix_and_union.sql deleted file mode 100644 index 4ed6c21f1..000000000 --- a/integration_tests/models/sql/test_get_tables_by_prefix_and_union.sql +++ /dev/null @@ -1,4 +0,0 @@ -{{config( materialized = 'table')}} - -{% set tables = dbt_utils.get_tables_by_prefix(target.schema, 'data_events_') %} -{{ dbt_utils.union_tables(tables) }} diff --git a/macros/sql/get_relations_by_prefix.sql b/macros/sql/get_relations_by_prefix.sql index 895ec795e..3ae91d6f0 100644 --- a/macros/sql/get_relations_by_prefix.sql +++ b/macros/sql/get_relations_by_prefix.sql @@ -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 %} diff --git a/macros/sql/union.sql b/macros/sql/union.sql index b6956f704..a5e04c016 100644 --- a/macros/sql/union.sql +++ b/macros/sql/union.sql @@ -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 -%}