Skip to content

Commit

Permalink
do statement "do something"
Browse files Browse the repository at this point in the history
  • Loading branch information
dataders committed Feb 14, 2021
1 parent 18903b4 commit 61f7a87
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dbt/include/sqlserver/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{%- set schema_relation = adapter.get_relation(database=relation.database,
schema=relation.schema,
identifier=table) -%}
{% do drop_relation(schema_relation) %}
{% do adapter.drop_relation(schema_relation) %}
{%- endfor %}

{% call statement('drop_schema') -%}
Expand Down Expand Up @@ -132,9 +132,8 @@
type='view')-%}
{%- set temp_view_sql = sql.replace("'", "''") -%}

{{ drop_relation(tmp_relation) }}

{{ drop_relation(relation) }}
{% do adapter.drop_relation(tmp_relation) %}
{% do adapter.drop_relation(relation) %}

EXEC('create view {{ tmp_relation }} as
{{ temp_view_sql }}
Expand All @@ -143,7 +142,7 @@
SELECT * INTO {{ relation }} FROM
{{ tmp_relation }}

{{ drop_relation(tmp_relation) }}
{% do adapter.drop_relation(tmp_relation) %}

{% if not temporary and as_columnstore -%}
{{ sqlserver__create_clustered_columnstore_index(relation) }}
Expand Down

0 comments on commit 61f7a87

Please sign in to comment.