-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use fully qualified relations for renames #1031
- Loading branch information
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(path={"identifier": new_name}) }} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jtcohen6
Author
Contributor
|
||
{%- endmacro -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(path={"identifier": new_name}) }} | ||
{%- endmacro -%} |
this change would be a breaking change if new_name is already passed in as a relation, rather than as text.
(or at least have a unit test to show that it isn't)
also, what happens if someone has passed in a fully qualified name as a string ? "backup_db.raw.my_tableBackup"