diff --git a/dbt/include/sqlserver/macros/materializations/tests.sql b/dbt/include/sqlserver/macros/materializations/tests.sql index a0d79bb2..1859a8da 100644 --- a/dbt/include/sqlserver/macros/materializations/tests.sql +++ b/dbt/include/sqlserver/macros/materializations/tests.sql @@ -4,11 +4,11 @@ USE [{{ target.database }}]; IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = '{{ target.schema }}') BEGIN - EXEC('CREATE SCHEMA [{{ target.schema }}]') + EXEC('CREATE SCHEMA "{{ target.schema }}"') END {% set testview %} - [{{ target.schema }}.testview_{{ range(1300, 19000) | random }}] + "{{ target.schema }}"."testview_{{ range(1300, 19000) | random }}" {% endset %} {% set sql = main_sql.replace("'", "''")%}