Skip to content

Commit

Permalink
move cache_added back to distpach macro
Browse files Browse the repository at this point in the history
  • Loading branch information
McKnight-42 committed Apr 19, 2024
1 parent 70049f5 commit 64c9cab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{% macro get_create_materialized_view_as_sql(relation, sql) -%}
{% if execute %}
{{ adapter.cache_added(relation) }}
{% endif %}
{{- adapter.dispatch('get_create_materialized_view_as_sql', 'dbt')(relation, sql) -}}
{%- endmacro %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{% macro postgres__get_create_materialized_view_as_sql(relation, sql) %}
create materialized view if not exists {{ relation }} as {{ sql }};

{% if execute %}
{{ adapter.cache_added(relation) }}
{% endif %}

{% for _index_dict in config.get('indexes', []) -%}
{{- get_create_index_sql(relation, _index_dict) -}}
{%- endfor -%}
Expand Down

0 comments on commit 64c9cab

Please sign in to comment.