Skip to content

Commit

Permalink
Merge pull request #1342 from fishtown-analytics/fix/temp-relations-f…
Browse files Browse the repository at this point in the history
…rom-modelname

Prefix temp relations with model name instead of alias (#1321)
  • Loading branch information
beckjake authored Mar 8, 2019
2 parents 2ad1166 + fb1926a commit a7bfae0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@


{%- set identifier = model['alias'] -%}
{%- set tmp_identifier = identifier + '__dbt_archival_tmp' -%}
{%- set tmp_identifier = model['name'] + '__dbt_archival_tmp' -%}

{% set tmp_table_sql -%}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{%- set unique_key = config.get('unique_key') -%}

{%- set identifier = model['alias'] -%}
{%- set tmp_identifier = identifier + '__dbt_incremental_tmp' -%}
{%- set tmp_identifier = model['name'] + '__dbt_incremental_tmp' -%}

{%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}
{%- set target_relation = api.Relation.create(identifier=identifier, schema=schema, database=database, type='table') -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% materialization table, default %}
{%- set identifier = model['alias'] -%}
{%- set tmp_identifier = identifier + '__dbt_tmp' -%}
{%- set backup_identifier = identifier + '__dbt_backup' -%}
{%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}
{%- set backup_identifier = model['name'] + '__dbt_backup' -%}
{%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}

{%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{%- materialization view, default -%}

{%- set identifier = model['alias'] -%}
{%- set tmp_identifier = identifier + '__dbt_tmp' -%}
{%- set backup_identifier = identifier + '__dbt_backup' -%}
{%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}
{%- set backup_identifier = model['name'] + '__dbt_backup' -%}
{%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}

{%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% materialization table, adapter='snowflake' %}
{%- set identifier = model['alias'] -%}
{%- set tmp_identifier = identifier + '__dbt_tmp' -%}
{%- set backup_identifier = identifier + '__dbt_backup' -%}
{%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}
{%- set backup_identifier = model['name'] + '__dbt_backup' -%}
{%- set non_destructive_mode = (flags.NON_DESTRUCTIVE == True) -%}

{%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}
Expand Down

0 comments on commit a7bfae0

Please sign in to comment.