-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
If attempting to preview an unsaved model (in dbt Studio), Fusion attempts to query the default specified database/schema, ignoring any database
and schema
overrides.
error: dbt1014: [Snowflake] 002003 (02000): SQL compilation error: Schema '<default_db>.NONE' does not exist or not authorized.
What version of dbt Fusion is this bug in? (find out by running dbt --version
)
preview.45
Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.
- YES
- NO
To Reproduce
generate_schema_name.sql:
{% macro generate_schema_name(custom_schema_name, node) -%}
{{ custom_schema_name | trim }}
{%- endmacro %}
yml config (set env var to appropriate prefix):
folder structure - models/stg/schema_name/model.sql
models:
project_name:
stg:
+database: "{{ env_var('DB_PREFIX') }}_stg"
schema_name:
+schema: "SCHEMA_NAME"
+materialized: table
edit a model and attempt to preview without saving, observe above error
Expected behavior
previewing unsaved models works
Operating System and CPU Type (please complete the following information):
dbt Studio
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working