Skip to content

Commit

Permalink
fix for adding columns to snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmuijsvanoord authored Feb 15, 2024
1 parent 80300df commit 7b5e28c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SQL Server doesnt support this, so we use the 'SELECT * INTO XYZ FROM ABC' synta

{% set columns %}
{% for column in columns %}
, CAST(NULL AS {{column.data_type}}) AS {{column_name}}
, CAST(NULL AS {{column.data_type}}) AS {{ column.quoted }}
{% endfor %}
{% endset %}

Expand All @@ -19,7 +19,7 @@ SQL Server doesnt support this, so we use the 'SELECT * INTO XYZ FROM ABC' synta
{% endset %}

{% set tempTable %}
SELECT * INTO {{tempTableName}} {{columns}} FROM [{{relation.database}}].[{{ relation.schema }}].[{{ relation.identifier }}] {{ information_schema_hints() }}
SELECT * {{columns}} INTO {{tempTableName}} FROM [{{relation.database}}].[{{ relation.schema }}].[{{ relation.identifier }}] {{ information_schema_hints() }}
{% endset %}

{% call statement('create_temp_table') -%}
Expand Down

0 comments on commit 7b5e28c

Please sign in to comment.