Skip to content

Commit 5102bbb

Browse files
committed
remove db-wide options
1 parent 820918b commit 5102bbb

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

dbt/include/sqlserver/macros/materializations/models/table/create_table_as.sql

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,13 @@
1919
');
2020

2121
-- drop current version of the table
22-
{{- sqlserver__drop_relation_script(relation) -}}
22+
{{- sqlserver__drop_relation_script(relation) }}
2323

2424
-- select into the table and create it that way
25-
{#- see https://learn.microsoft.com/en-us/sql/t-sql/queries/select-into-clause-transact-sql?view=sql-server-ver16#b-inserting-rows-using-minimal-logging #}
26-
ALTER DATABASE [{{ relation.database }}] SET RECOVERY BULK_LOGGED
27-
2825
SELECT *
29-
INTO {% if temporary %}#{% endif %}{{ relation.include(database=(not temporary), schema=(not temporary)) }}
26+
INTO {{ relation.include(database=False) }}
3027
FROM {{ tmp_relation }}
3128

32-
{#- see https://learn.microsoft.com/en-us/sql/t-sql/queries/select-into-clause-transact-sql?view=sql-server-ver16#b-inserting-rows-using-minimal-logging #}
33-
ALTER DATABASE [{{ relation.database }}] SET RECOVERY FULL
34-
3529
-- drop temp view
3630
{{ sqlserver__drop_relation_script(tmp_relation) }}
3731

0 commit comments

Comments
 (0)