Skip to content

Commit

Permalink
Merge pull request #11 from kristeligt-dagblad/dbt-v0.18.0-compatibility
Browse files Browse the repository at this point in the history
#9 Use adapter.dispatch instead of adapter_macro.
  • Loading branch information
rbjerrum authored Oct 12, 2020
2 parents a24d9f8 + caab6fa commit 0a05ee3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions macros/materializations/model.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{% macro drop_model(relation) %}
{{ adapter_macro('dbt_ml.drop_model', relation) }}
{{
adapter.dispatch(
macro_name='drop_model',
packages=var('dbt_ml_dispatch_list', []) + ['dbt_ml']
)
(relation)
}}
{% endmacro %}

{% macro default__drop_model(relation) %}
Expand Down Expand Up @@ -31,7 +37,13 @@
{%- endmacro -%}

{% macro create_model_as(relation, sql) -%}
{{ adapter_macro('dbt_ml.create_model_as', relation, sql) }}
{{
adapter.dispatch(
macro_name='create_model_as',
packages=var('dbt_ml_dispatch_list', []) + ['dbt_ml']
)
(relation, sql)
}}
{%- endmacro %}

{% macro default__create_model_as(relation, sql) %}
Expand Down

0 comments on commit 0a05ee3

Please sign in to comment.