-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
8 additions
and
11 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
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,10 +1,9 @@ | ||
{%- macro create_backup(relation) -%} | ||
-- get the standard backup name | ||
{% set backup_relation = make_backup_relation(relation, relation.type) %} | ||
-- get the standard backup name | ||
{% set backup_relation = make_backup_relation(relation, relation.type) %} | ||
|
||
-- drop any pre-existing backup | ||
{{ drop_relation(backup_relation) }} | ||
|
||
{{ adapter.rename_relation(relation, backup_relation) }} | ||
-- drop any pre-existing backup | ||
{{ drop_relation(backup_relation) }} | ||
|
||
{{ adapter.rename_relation(relation, backup_relation) }} | ||
{%- endmacro -%} |
2 changes: 0 additions & 2 deletions
2
dbt/include/databricks/macros/relations/create_intermediate.sql
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
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 databricks__drop_view(relation) -%} | ||
drop view if exists {{ relation.render() }} | ||
DROP VIEW IF EXISTS {{ relation.render() }} | ||
{%- 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 databricks__get_rename_view_sql(relation, new_name) %} | ||
ALTER VIEW {{ relation.render() }} RENAME TO {{ new_name }} | ||
ALTER VIEW {{ relation.render() }} RENAME TO `{{ new_name }}` | ||
{% endmacro %} |