Skip to content

Commit

Permalink
update rename macro to include fully qualified target name
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed May 22, 2024
1 parent 4ff6bdb commit f9e8b16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbt/include/snowflake/macros/relations/table/rename.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{%- macro snowflake__get_rename_table_sql(relation, new_name) -%}
alter table {{ relation }} rename to {{ new_name }}
alter table {{ relation }} rename to {{ relation.incorporate(identifier=new_name}) }}
{%- endmacro -%}
2 changes: 1 addition & 1 deletion dbt/include/snowflake/macros/relations/view/rename.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{%- macro snowflake__get_rename_view_sql(relation, new_name) -%}
alter view {{ relation }} rename to {{ new_name }}
alter view {{ relation }} rename to {{ relation.incorporate(identifier=new_name}) }}
{%- endmacro -%}

0 comments on commit f9e8b16

Please sign in to comment.