Skip to content

Commit

Permalink
revert get_relation call back get cache_renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
McKnight-42 committed Apr 19, 2024
1 parent 39f88fe commit 5f0f049
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% macro get_rename_materialized_view_sql(relation, new_name) %}
{% set database = relation.database %}
{% set schema = relation.schema %}
{% set to_relation = adapter.get_relation(database=database, schema=schema, identifier=new_name) %}
{% if relation is not none %}
{% set database = relation.database %}
{% set schema = relation.schema %}
{% set to_relation = adapter.get_relation(database=database, schema=schema, identifier=new_name) %}
{% if to_relation is not none %}
{{ adapter.rename_relation(from_relation=relation, to_relation=to_relation) }}
{{ adapter.cache_renamed(from_relation=relation, to_relation=to_relation) }}
{% endif %}
{% endif %}
{{- adapter.dispatch('get_rename_materialized_view_sql', 'dbt')(relation, new_name) -}}
Expand Down

0 comments on commit 5f0f049

Please sign in to comment.