-
Notifications
You must be signed in to change notification settings - Fork 104
Description
Similar problem to the resolved issue: #549
In the project.yml the quoting for the database, schema and identifier is set as following:
quoting:
database: true
schema: true
identifier: true
My model mytestmodel should be created in schema group
Following line ignores the setting for the quotation completly.
https://github.com/dbt-msft/dbt-sqlserver/blob/master/dbt/include/sqlserver/macros/relations/table/create.sql#L36
EXEC('DROP VIEW IF EXISTS {{tmp_relation.schema}}.{{tmp_relation.identifier}}')
The complied code looks like this:
EXEC('DROP VIEW IF EXISTS "group"."mytestmodel__dbt_tmp_vw"')
This code leads to the error:
Incorrect syntax near the keyword 'group'.
As a workaround overwritting the macro and replace the line with the following line works for me (but this doesn't consider the quoting setting from the project.yml):
EXEC('DROP VIEW IF EXISTS "{{tmp_relation.schema}}"."{{tmp_relation.identifier}}"')