diff --git a/dbt/include/sqlserver/macros/adapters/schema.sql b/dbt/include/sqlserver/macros/adapters/schema.sql index d18d3a00..f3b15e12 100644 --- a/dbt/include/sqlserver/macros/adapters/schema.sql +++ b/dbt/include/sqlserver/macros/adapters/schema.sql @@ -3,7 +3,7 @@ USE [{{ relation.database }}]; IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = '{{ relation.without_identifier().schema }}') BEGIN - EXEC('CREATE SCHEMA {{ relation.without_identifier().schema }}') + EXEC('CREATE SCHEMA [{{ relation.without_identifier().schema }}]') END {% endcall %} {% endmacro %}