Luiz Felipe Campos da Silva
12/08/2025, 2:11 PMkapa.ai
12/08/2025, 2:11 PMkapa.ai
12/08/2025, 2:11 PMdbt_models and optionally dbt_columns) via vars in dbt_project.yml and/or by disabling specific models. ### 1. Disable all metadata model updates in the hooks This stops the on-run-end hook from updating any metadata tables (dbt_models, dbt_tests, dbt_sources, etc.): yml vars: disable_dbt_artifacts_autoupload: true [[On-run-end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks#can-i-disable-the-on-run-end-hooks%3F)] If you do this, Elementary recommends manually updating the artifacts on deploys: bash dbt run --select elementary.edr.dbt_artifacts [[On-run-end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks)] ### 2. Disable only dbt_columns uploads (keep other metadata) If you want to keep other metadata tables up to date but skip `dbt_columns`: yml vars: disable_dbt_columns_autoupload: true [[On-run-end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks#can-i-disable-the-on-run-end-hooks%3F)] ### 3. Disable the dbt_columns / information_schema models entirely If the problem is with the models themselves (e.g., permissions or performance), you can disable them like any dbt model: yml models: elementary: edr: dbt_artifacts: dbt_columns: +enabled: false metadata_store: +enabled: false # disables all metadata_store models, incl. filtered_information_schema_* [[BQ permissions thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1687786100077469?thread_ts=1687786100.077469&cid=C02CTC89LAX); [Tables.list / IS threads](https://elementary-community.slack.com/archives/C02CTC89LAX/p1686855852542619?thread_ts=1686855852.542619&cid=C02CTC89LAX)] If you only want to disable a single metadata_store model (e.g. filtered_information_schema_columns): yml models: elementary: edr: metadata_store: filtered_information_schema_columns: +enabled: false [[Databricks IS thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1693840882682879?thread_ts=1693840882.682879&cid=C02CTC89LAX)] --- In practice: - Use disable_dbt_artifacts_autoupload / disable_dbt_columns_autoupload to control what the hooks update. - Use +enabled: false on specific models if you don’t want those tables built at all.Luiz Felipe Campos da Silva
12/08/2025, 2:16 PMdisable_dbt_artifacts_autoupload: true
this also disables run_results upload?
@kapa.aikapa.ai
12/08/2025, 2:16 PMkapa.ai
12/08/2025, 2:16 PMyml vars: disable_dbt_artifacts_autoupload: true only disables metadata (“artifacts”) uploads such as dbt_models, dbt_tests, dbt_sources, and optionally dbt_columns. It does not stop run_results / elementary_test_results / invocation rows from being written. [[On‑run‑end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks#can-i-disable-the-on-run-end-hooks%3F); [BQ concurrency thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1692802428509179?thread_ts=1692802428.509179&cid=C02CTC89LAX)] To disable result uploads you would additionally set: yml vars: disable_run_results: true disable_tests_results: true disable_dbt_invocation_autoupload: true [[On‑run‑end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks#can-i-disable-the-on-run-end-hooks%3F)]Luiz Felipe Campos da Silva
12/08/2025, 3:37 PMkapa.ai
12/08/2025, 3:38 PMkapa.ai
12/08/2025, 3:38 PMdbt_project.yml are evaluated as part of that package’s project, and then your root project can only override them in specific, higher‑priority places (e.g. at the model level or under your own project name in dbt_project.yml). If the override is placed at the wrong hierarchy, the package’s config “wins” and controls how views/tables are built. From the Elementary threads, there are two common patterns where this shows up: 1. Elementary (or any package) is configured at the wrong level in your root dbt_project.yml If you nest elementary under your own project key, dbt treats that config as belonging to my_project.elementary (a sub‑folder), not the elementary package. In that case the package’s own configs take precedence. Wrong: yml models: academia: elementary: +schema: elementary # applies to academia/elementary, not the package Correct: yml models: elementary: +schema: elementary # this targets the package academia: # your project’s models… [[Multi‑project schema thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1669676588368489?thread_ts=1669676588.368489&cid=C02CTC89LAX); [IS schema thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680270133127419?thread_ts=1680270133.127419&cid=C02CTC89LAX)] 2. Global configs in your root project are overriding package‑level materializations If you declare a global models: block with materialized: table at the top level, that can override package models unless you scope it to your own project name only. This is why Elementary’s docs explicitly recommend: yml models: my_project: materialized: "{{ 'table' if target.name == 'prod-cloud' else 'view' }}" elementary: +schema: "elementary" so the global materialization does not affect Elementary’s incremental models. [[Quickstart dbt‑package](https://docs.elementary-data.com/oss/quickstart/quickstart-cli-package#step-by-step%3A-install-elementary-dbt-package)] A user who had models: materialized: table at the very top saw Elementary’s incremental models getting rebuilt as tables; moving that config under their own project key fixed it. [[dbt_invocations override thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1698507102830499?thread_ts=1698507102.830499&cid=C02CTC89LAX)] --- What to check in your project 1. In your root dbt_project.yml, ensure global configs are scoped: yml models: my_project: # your project name materialized: view # or your logic elementary: +schema: elementary 2. If you’re developing your own package, remember: - Vars must have defaults inside the package, and can then be overridden from the root project. [[Package vars thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1684508852749729?thread_ts=1684508852.749729&cid=C02CTC89LAX)] - The package’s dbt_project.yml is compiled independently; root‑project vars/configs don’t exist there unless explicitly overridden at the correct hierarchy. If you share the relevant part of your dbt_project.yml (root + package), I can point to the exact place where the package config is taking precedence.Luiz Felipe Campos da Silva
12/08/2025, 3:41 PMdbt clean
- "target"
- "dbt_packages"
- "logs"
vars:
disable_dbt_artifacts_autoupload: true
macros_nexus:
catalog: "platform"
schema: "dummy_dbt2_metrics"
# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models
# In this example config, we tell dbt to build all models in the example/
# directory as views by default. These settings can be overridden in the
# individual model files using the {{ config(...) }} macro.
models:
+persist_docs:
relation: true
columns: true
elementary_test2:
example:
+materialized: view
elementary
+schema: metrics
+enabled: "{{ target.name in ('prod') and var('ELEMENTARY_ENABLED', true) }}"
edr:
dbt_artifacts:
+enabled: "{{var('ARTIFACTS_ENABLED', false)}}"
on-run-start:
- "{{ macros_nexus.check_select_arg() if target.name == 'local' else 'select 1' }}"
macros_nexus schema is taking precedence when building the job_run_results view look:
from
`platform`.`general_elementary_metrics`.`dbt_invocations`
It should be dummy_dbt2_metrics instead of thiskapa.ai
12/08/2025, 3:41 PMkapa.ai
12/08/2025, 3:42 PMelementary config isn’t actually being applied, so dbt falls back to whatever your generate_schema_name / macros_nexus logic says (which points to general_elementary_metrics). This is the same indentation / scoping issue shown in multiple Elementary threads. [[Separate schema thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680270133127419?thread_ts=1680270133.127419&cid=C02CTC89LAX); [Config path unused thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1691614851612199?thread_ts=1691614851.612199&cid=C02CTC89LAX)] ### 1. Fix the models: indentation You currently have: yml models: +persist_docs: relation: true columns: true elementary_test2: example: +materialized: view elementary +schema: metrics +enabled: "{{ target.name in ('prod') and var('ELEMENTARY_ENABLED', true) }}" edr: dbt_artifacts: +enabled: "{{var('ARTIFACTS_ENABLED', false)}}" elementary is missing a colon and is not a proper key; dbt will ignore that block, so your package configs don’t apply. You want: yml models: +persist_docs: relation: true columns: true elementary_test2: example: +materialized: view elementary: # <- colon, same level as elementary_test2 +schema: metrics +enabled: "{{ target.name in ('prod') and var('ELEMENTARY_ENABLED', true) }}" edr: dbt_artifacts: +enabled: "{{ var('ARTIFACTS_ENABLED', false) }}" This pattern (package name as a top‑level key under models:) is exactly what Elementary support recommend; when it was nested incorrectly, configs were ignored and the default/custom schema logic took precedence. [[Same‑schema issue](https://elementary-community.slack.com/archives/C02CTC89LAX/p1684341029701899?thread_ts=1684341029.701899&cid=C02CTC89LAX); [Unused config path fix](https://elementary-community.slack.com/archives/C02CTC89LAX/p1691614851612199?thread_ts=1691614851.612199&cid=C02CTC89LAX)] ### 2. Re‑run Elementary models After fixing dbt_project.yml, re‑run Elementary models so views (including job_run_results) are rebuilt in the correct schema: bash dbt run --select elementary [[Config / schema threads](https://elementary-community.slack.com/archives/C02CTC89LAX/p1712851926036669?thread_ts=1712851926.036669&cid=C02CTC89LAX)] ### 3. Why macros_nexus “wins” Your custom schema logic (in generate_schema_name or equivalent) always applies unless you correctly scope configurations to the elementary package. When the elementary block is malformed/ignored, dbt only sees your global / macros_nexus rules, so it keeps using platform.general_elementary_metrics. This is the same behavior others saw when a custom generate_schema_name or global config was affecting Elementary until they either: - Scoped configs under models: elementary: ..., or - Added a special case in the macro for node.package_name == 'elementary'. [[Custom schema override](https://elementary-community.slack.com/archives/C02CTC89LAX/p1712851926036669?thread_ts=1712851926.036669&cid=C02CTC89LAX); [Generate_schema_name exclusion](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680270133127419?thread_ts=1680270133.127419&cid=C02CTC89LAX)] If, after fixing the indentation, you still see general_elementary_metrics, you’ll need to add such a special case in your schema macro for node.package_name == 'elementary'.Luiz Felipe Campos da Silva
12/08/2025, 3:43 PMkapa.ai
12/08/2025, 3:43 PMkapa.ai
12/08/2025, 3:44 PMmodels: elementary: block is correct. The key detail from similar cases: Elementary will respect your custom schema logic unless you explicitly special‑case the elementary package in that macro. Several users saw exactly this: configs like yml models: elementary: +schema: elementary were ignored because their generate_schema_name (or equivalent) macro always forced another schema (e.g. TRANSFORMED_*, general_elementary_metrics). The fix was to handle node.package_name == 'elementary' differently in the macro so that the package’s +schema: wins. [[Custom schema override](https://elementary-community.slack.com/archives/C02CTC89LAX/p1712851926036669?thread_ts=1712851926.036669&cid=C02CTC89LAX); [Alternative pattern fix](https://elementary-community.slack.com/archives/C02CTC89LAX/p1678390370071829?thread_ts=1678390370.071829&cid=C02CTC89LAX)] ### What to change In your custom schema macro (the one macros_nexus uses, equivalent to generate_schema_name), add a branch for the Elementary package. Conceptually: jinja {% macro generate_schema_name(custom_schema_name, node) -%} {%- set default_schema = target.schema -%} {% if node.package_name == 'elementary' and custom_schema_name %} {{ default_schema }}_{{ custom_schema_name | trim }} {% else %} {{ generate_schema_name_for_env(custom_schema_name, node) }} {% endif %} {%- endmacro %} This pattern comes directly from Elementary support’s guidance for users whose custom schema logic was overriding the Elementary schema; once they added the node.package_name == 'elementary' branch, Elementary models started going to the configured schema (e.g. ..._elementary) instead of the macro’s default (TRANSFORMED_*, general_elementary_metrics, etc.). [[Custom schema override](https://elementary-community.slack.com/archives/C02CTC89LAX/p1712851926036669?thread_ts=1712851926.036669&cid=C02CTC89LAX); [Docs alt‑pattern fix](https://elementary-community.slack.com/archives/C02CTC89LAX/p1678390370071829?thread_ts=1678390370.071829&cid=C02CTC89LAX)] After updating the macro: 1. Re‑run the Elementary models so the views are rebuilt in the correct schema: bash dbt run --select elementary 2. Then re‑run your tests / jobs. If you can paste your actual schema macro (from macros_nexus), I can show the exact minimal change that preserves your current behavior for everything else while letting models: elementary: +schema: metrics win for Elementary.Luiz Felipe Campos da Silva
12/08/2025, 3:46 PMkapa.ai
12/08/2025, 3:46 PMkapa.ai
12/08/2025, 3:46 PMgeneral_elementary_metrics as a literal schema name, which is why it keeps winning over your +schema: metrics config. Here’s what it does: jinja {% macro generate_schema_name(custom_schema_name, node) -%} {%- set default_schema = target.schema -%} {%- if custom_schema_name is none or custom_schema_name | trim == '' -%} {{ default_schema }} {%- elif custom_schema_name | trim == 'general_elementary_metrics'-%} {{ custom_schema_name | trim }} # <- hard‑codes schema "general_elementary_metrics" {%- else -%} {{ default_schema }}_{{ custom_schema_name | trim }} {%- endif -%} {%- endmacro %} For Elementary: - Your dbt_project.yml has: yml models: elementary: +schema: metrics - So custom_schema_name for Elementary models is metrics. - That hits the else branch, which returns {{ default_schema }}_metrics (e.g. dummy_dbt2_metrics), unless something in your setup is passing general_elementary_metrics as the custom schema for those models. From similar Slack threads, the usual fix is: 1. Special‑case the Elementary package in generate_schema_name, so its +schema: is applied literally, regardless of other logic. For example (pattern taken from other users who had custom schema macros overriding Elementary): [[Custom schema override](https://elementary-community.slack.com/archives/C02CTC89LAX/p1712851926036669?thread_ts=1712851926.036669&cid=C02CTC89LAX)] jinja {% macro generate_schema_name(custom_schema_name, node) -%} {%- set default_schema = target.schema -%} {% if node.package_name == 'elementary' and custom_schema_name %} {# respect the +schema on Elementary models (e.g. "metrics") #} {{ custom_schema_name | trim }} {% elif custom_schema_name is none or custom_schema_name | trim == '' -%} {{ default_schema }} {% elif custom_schema_name | trim == 'general_elementary_metrics'-%} {{ custom_schema_name | trim }} {% else -%} {{ default_schema }}_{{ custom_schema_name | trim }} {% endif %} {%- endmacro %} This is the same approach Elementary support recommended when users’ custom generate_schema_name macros kept routing Elementary tables to the wrong schema until they added a node.package_name == 'elementary' branch. [[Package exclusion pattern](https://elementary-community.slack.com/archives/C02CTC89LAX/p1678390370071829?thread_ts=1678390370.071829&cid=C02CTC89LAX); [Similar override issue](https://elementary-community.slack.com/archives/C02CTC89LAX/p1712851926036669?thread_ts=1712851926.036669&cid=C02CTC89LAX)] 2. Then re‑run Elementary models so they get rebuilt into the intended schema: bash dbt run --select elementary If after this you still see general_elementary_metrics in the FROM of job_run_results, it means something (a config or macro) is explicitly giving Elementary models that custom_schema_name, and we’d need to inspect those configs; the shared sources don’t contain more specific guidance for that exact interaction.Luiz Felipe Campos da Silva
12/08/2025, 4:11 PMkapa.ai
12/08/2025, 4:11 PMkapa.ai
12/08/2025, 4:11 PMelementary_database, elementary_schema) do not appear in the Elementary docs or Slack threads you shared, so I can’t confirm they exist or are read by Elementary. I would not expect them alone to fix your problem. From the sources, Elementary’s location is controlled via standard dbt configs in dbt_project.yml, not via custom vars like that: yml models: elementary: +database: <your_database> +schema: <your_schema> This is the documented way to force Elementary to always use a specific database and schema (for example on BigQuery, to always write to project A + dataset elementary). [[BQ multi-project](https://elementary-community.slack.com/archives/C02CTC89LAX/p1681162450753059?thread_ts=1681162450.753059&cid=C02CTC89LAX); [Quickstart dbt package](https://docs.elementary-data.com/oss/quickstart/quickstart-cli-package#step-by-step%3A-install-elementary-dbt-package)] So: - I’m not aware of built‑in vars named elementary_database / elementary_schema in Elementary. - To fix your issue, use +database and +schema under models: elementary: in dbt_project.yml, and ensure your generate_schema_name macro doesn’t override that for the elementary package. [[Change Elementary schema](https://docs.elementary-data.com/oss/general/faq#can-i-change-the-elementary-schema%3F); [Custom schema macro examples](https://elementary-community.slack.com/archives/C02CTC89LAX/p1678390370071829?thread_ts=1678390370.071829&cid=C02CTC89LAX)] If you want, paste your updated models: elementary: block and I can align it to the patterns from the docs.Luiz Felipe Campos da Silva
12/08/2025, 4:39 PMkapa.ai
12/08/2025, 4:40 PMkapa.ai
12/08/2025, 4:40 PMdbt_project.yml. [[Disable models](https://elementary-community.slack.com/archives/C02CTC89LAX/p1686218882162339?thread_ts=1686218882.162339&cid=C02CTC89LAX)] ### 1. Disable specific Elementary models (view models) Look up which Elementary models are views, then disable them explicitly: yml models: elementary: edr: metadata_store: filtered_information_schema_tables: +enabled: false filtered_information_schema_columns: +enabled: false dbt_artifacts: dbt_models: +enabled: false dbt_columns: +enabled: false This pattern (drilling down to the model path and setting +enabled: false) is what support recommends when you want to turn off individual Elementary models. [[Disable specific models](https://elementary-community.slack.com/archives/C02CTC89LAX/p1686218882162339?thread_ts=1686218882.162339&cid=C02CTC89LAX)] Be aware: disabling some of these (especially the information_schema ones) will disable related features such as schema_changes tests. [[Info schema note](https://elementary-community.slack.com/archives/C02CTC89LAX/p1686218882162339?thread_ts=1686218882.162339&cid=C02CTC89LAX)] ### 2. Disable all Elementary models by default, then re‑enable only what you need If the goal is to effectively skip most Elementary models (many of which are views) on regular runs, you can invert the logic and control them with a var: [[FAQ – disable models](https://docs.elementary-data.com/oss/general/faq#can-i-disable--exclude-the-elementary-models%3F)] yml models: elementary: +schema: elementary edr: +enabled: "{{ var('enable_elementary_models', false) }}" Then only run them explicitly when needed: bash dbt run --select elementary --vars '{"enable_elementary_models": true}' From the knowledge we have, there is no built‑in Elementary setting that says “disable only view materializations automatically”; you must either disable specific models or use the var‑based pattern above.Luiz Felipe Campos da Silva
12/08/2025, 8:00 PMkapa.ai
12/08/2025, 8:00 PMkapa.ai
12/08/2025, 8:01 PMelementary.edr.dbt_run_results. [[Dbt package overview](https://docs.elementary-data.com/guides/modules-overview/dbt-package)] You control where those models are built (schema/database) via the models: elementary: block: yml models: my_project: # your models elementary: +schema: elementary # or a dedicated schema like <target_schema>_elementary [[Quickstart dbt package](https://docs.elementary-data.com/oss/quickstart/quickstart-cli-package#step-by-step%3A-install-elementary-dbt-package)] As long as: 1. Elementary models are in their own schema (recommended), and 2. Your package’s models with the same names are in a different schema (or at least different database/schema combo), the warehouse objects won’t collide even if the model names are identical. If you put both into the same database + schema and use the same relation names, they will conflict (dbt will try to create/replace the same table or view). The sources you provided don’t describe any special Elementary mechanism to automatically resolve such naming clashes, so the safe pattern is to keep Elementary in a dedicated schema and avoid reusing the exact same relation names there. [[Elementary schema FAQ](https://docs.elementary-data.com/oss/general/faq#can-i-change-the-elementary-schema%3F)]