Skip to content

Commit

Permalink
Use warn exception
Browse files Browse the repository at this point in the history
  • Loading branch information
clrcrl committed Mar 19, 2020
1 parent fcb2de5 commit e931598
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'dbt_utils'
version: '0.1.0'

require-dbt-version: ">=0.14.0"
require-dbt-version: ">=0.15.1"

target-path: "target"
clean-targets: ["target", "dbt_modules"]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: '1.0'

profile: 'integration_tests'

require-dbt-version: ">=0.15.0"
require-dbt-version: ">=0.15.1"

source-paths: ["models"]
analysis-paths: ["analysis"]
Expand Down
2 changes: 1 addition & 1 deletion macros/sql/get_relations_by_prefix.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

{% macro get_tables_by_prefix(schema, prefix, exclude='', database=target.database) %}
{% if execute %}
{{ log("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", info=True) }}
{% do exceptions.warn("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") %}
{% endif %}


Expand Down
2 changes: 1 addition & 1 deletion macros/sql/union.sql
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
{%- macro union_tables(tables, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_table') -%}

{%- if execute -%}
{{ log("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", info=True) }}
{% do exceptions.warn("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") %}
{%- endif -%}

{{ return(dbt_utils.union_relations(tables, column_override, include, exclude, source_column_name)) }}
Expand Down
2 changes: 1 addition & 1 deletion macros/sql/unpivot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Arguments:
{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', table=none) -%}

{% if execute and table %}
{{ log("Warning: the `unpivot` macro no longer accepts a `table` parameter. This parameter will be deprecated in a future release of dbt-utils. Use the `relation` parameter instead", info=True) }}
{% do exceptions.warn("Warning: the `unpivot` macro no longer accepts a `table` parameter. This parameter will be deprecated in a future release of dbt-utils. Use the `relation` parameter instead") %}
{% endif %}

{% if relation and table %}
Expand Down

0 comments on commit e931598

Please sign in to comment.