diff --git a/dbt/include/snowflake/macros/relations/_rename_approach_1.sql b/dbt/include/snowflake/macros/relations/_rename_approach_1.sql index ee2e126b4..406a765a0 100644 --- a/dbt/include/snowflake/macros/relations/_rename_approach_1.sql +++ b/dbt/include/snowflake/macros/relations/_rename_approach_1.sql @@ -52,5 +52,6 @@ Implement at the `dbt-snowflake` level in `snowflake__get_rename_x_sql()`: new_name: str - new identifier for `relation` Returns: templated string */ + ------------ CHANGE: updated the line below ------------ alter view {{ relation }} rename to {{ relation.incorporate(path={"identifier": new_name}) }} {%- endmacro -%} diff --git a/dbt/include/snowflake/macros/relations/_rename_approach_2.sql b/dbt/include/snowflake/macros/relations/_rename_approach_2.sql index aa0be43a0..fd0aee8b7 100644 --- a/dbt/include/snowflake/macros/relations/_rename_approach_2.sql +++ b/dbt/include/snowflake/macros/relations/_rename_approach_2.sql @@ -18,6 +18,7 @@ Implement at the `dbt-adapters` level in `get_rename_sql()`: Returns: templated string */ {{- log('Applying RENAME to: ' ~ relation) -}} + ------------ CHANGE: added the line below ------------ {% set new_name = relation.incorporate(path={"identifier": new_name}).render() if new_name is string else new_name.render() %} {{- adapter.dispatch('get_rename_sql', 'dbt')(relation, new_name) -}} {%- endmacro -%} diff --git a/dbt/include/snowflake/macros/relations/_rename_approach_3.sql b/dbt/include/snowflake/macros/relations/_rename_approach_3.sql index 76e120352..9c870c862 100644 --- a/dbt/include/snowflake/macros/relations/_rename_approach_3.sql +++ b/dbt/include/snowflake/macros/relations/_rename_approach_3.sql @@ -46,6 +46,7 @@ Implement at the `dbt-snowflake` level by overriding `default__get_rename_sql()` ------------------------------------------ dbt-snowflake ------------------------------------------ +------------ CHANGE: added the entire macro below ------------ {%- macro snowflake__get_rename_sql(relation, new_name) -%} {% set new_name = relation.incorporate(path={"identifier": new_name}).render() if new_name is string else new_name.render() %} {{ default__get_rename_sql(relation, new_name) }}