Ryan Shadle
11/27/2023, 6:34 PMThere are 1 unused configuration paths warning in my command when running dbt run --select elementary. Those tables are then created in an empty schema beginning with none. For example in my local dev environment, ryan_None.elementary_test_results is where they are created, but I'd expect them to be created in ryan_elementary.elementary_test_results for my dev environment. Any thoughts or adjustments to make sure it utilizes the elementary schema I've created? I don't have this issue with other model configurationsRyan Shadle
11/27/2023, 7:51 PMname: 'project-name'
version: '1.0'
config-version: 2
vars:
surrogate_key_treat_nulls_as_empty_strings: true #turn on legacy behavior
profile: 'default'
model-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
seed-paths: ["data"]
macro-paths: ["macros"]
snapshot-paths: ['snapshots']
target-path: "target"
clean-targets:
- "target"
- "dbt_packages"
seeds:
schema: seed_data
quote_columns: false
models:
+snowflake_warehouse: "{% if target.name != 'prod' %} {{ target.warehouse }} {% else %} WAREHOUSE {% endif %}"
project-name:
enabled: true
materialized: view
base:
materialized: view
schema: base
post-hook:
- "grant usage on schema {{ this.schema }} to looker_role"
- "grant select on {{this}} to looker_role"
staging:
enabled: true
materialized: table
schema: staging
schema3:
enabled: true
schema: schema3
materialized: table
schema4:
enabled: true
schema: schema4
materialized: table
schema5:
enabled: true
schema: schema3
materialized: table
schema6:
enabled: true
schema: schema6
materialized: table
schema7:
enabled: true
schema: schema7
materialized: table
schema8:
enabled: false
schema: schema8
materialized: view
schema9:
enabled: true
schema: schema8
materialized: table
post-hook:
- "grant select on {{this}} to looker_role"
share_schema1:
enabled: true
schema: share_schema1
post-hook:
- "{{ share_view(this.database, this.schema, this.table) }}"
share_schema2:
enabled: true
database: "{% if target.name != 'prod' %}share_schema2_dev{% else %}share_schema2{% endif %}"
schema: share_schema2
post-hook:
- "{{ share_schema2(this.database, this.schema, this.table) }}"
share_schema3:
enabled: true
database: "{% if target.name != 'prod' %}share_schema3_dev{% else %}share_schema3{% endif %}"
schema: share_schema3
post-hook:
- "{{ share_schema3(this.database, this.schema, this.table) }}"
schema10:
enabled: true
schema: schema10
materialized: table
schema11:
enabled: true
schema: schema11
materialized: table
elementary:
enabled: true
schema: elementary
pre-hook: "{{ logging.log_model_start_event() }}"
post-hook: "{{ logging.log_model_end_event() }}"
on-run-end:
- "{% for (database, schema) in database_schemas %}grant usage on schema {{database}}.{{ schema }} to looker_role;{% endfor %}"
- "{% for (database, schema) in database_schemas %}grant select on all tables in schema {{database}}.{{ schema }} to looker_role;{% endfor %}"
- "{% for (database, schema) in database_schemas %}grant select on all views in schema {{database}}.{{ schema }} to looker_role;{% endfor %}"Jack P
12/06/2023, 8:11 AMelementary is only nested under modelsRyan Shadle
12/06/2023, 4:32 PM