We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e81f138 commit efe1bcbCopy full SHA for efe1bcb
dbt/include/sqlserver/macros/adapters/schema.sql
@@ -1,9 +1,10 @@
1
{% macro sqlserver__create_schema(relation) -%}
2
+{% auth = config.get("auth") %}
3
{% call statement('create_schema') -%}
4
USE [{{ relation.database }}];
5
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = '{{ relation.without_identifier().schema }}')
6
BEGIN
- EXEC('CREATE SCHEMA [{{ relation.without_identifier().schema }}]')
7
+ EXEC('CREATE SCHEMA [{{ relation.without_identifier().schema }}] {%- if auth -%} AUTHORIZATION: [{{auth}}]')
8
END
9
{% endcall %}
10
{% endmacro %}
0 commit comments