<@U088WCP3B4P> - I am a newbie to Elementary &amp;...
# ask-elementary-ai
s
@kapa.ai - I am a newbie to Elementary & DBT. I want to check if there is a way in which i can use Elementary package features only for selected set of models ( artifacts parsing and storing to elementary schema). I am using dbt core and elementary oss
k
A message from kapa.ai
New message text here
s
@kapa.ai can define a variable in dbt_project.yml file to disable the Elementary artifact upload for all models by default, and then re-enable it selectively for the models ? Please check the below and suggest Step 1: Disable artifact upload globally In your dbt_project.yml, use a variable to conditionally enable or disable the package. Set the default to false so Elementary is effectively disabled unless explicitly overridden. # dbt_project.yml vars: elementary: enable_elementary_artifacts_upload: false models: your_project_name: +materialized: "table" # Your other configs here elementary: +schema: "elementary" # The schema where Elementary tables will be built Step 2: Enable artifact upload for specific models For the models you want to monitor, add a config block with the vars to override the default and enable Elementary. -- models/production/critical_revenue_model.sql {{ config( materialized='incremental', vars={ "elementary": { "enable_elementary_artifacts_upload": true } } ) }} select * from {{ ref('stg_revenue_data') }}
k
A message from kapa.ai
Based on the available knowledge sources, there is no documented or supported way in Elementary OSS to selectively enable artifact upload for specific models by overriding a variable at the model level. The configuration options for disabling or enabling artifact uploads (such as
disable_dbt_artifacts_autoupload
,
disable_run_results
, etc.) are set globally in the
vars
section of your
dbt_project.yml
and are not designed to be overridden per model. The recommended and documented approaches are: - Disable artifact upload globally or by environment/target using variables in `dbt_project.yml`:
Copy code
yaml   vars:     disable_run_results: "{{ target.name != 'prod' }}"     disable_tests_results: "{{ target.name != 'prod' }}"     disable_dbt_artifacts_autoupload: "{{ target.name != 'prod' }}"     disable_dbt_invocation_autoupload: "{{ target.name != 'prod' }}"
This disables artifact uploads for all models except when the target is
prod
, for example. [See FAQ: Can I disable the on-run-end hooks or results uploading?](https://docs.elementary-data.com/oss/general/faq) - Enable or disable the entire Elementary package for specific environments:
Copy code
yaml   models:     elementary:       +enabled: "{{ target.name == 'prod' }}"
This disables all Elementary models except in production. There is no support in the knowledge sources for enabling artifact upload on a per-model basis by setting a variable in a model's config block. The variables that control artifact upload are evaluated at the project level, not at the individual model level. Summary: Your proposed approach (using a variable to disable artifact upload globally and then re-enabling it for specific models via model-level config) is not supported by Elementary OSS according to the current documentation and community discussions. Artifact upload control is only available at the project/environment level, not per model. If you need more granular control, this would require a feature request or custom development, as it is not currently possible with the documented configuration options in Elementary OSS. [Reference: FAQ and community discussions](https://docs.elementary-data.com/oss/general/faq)
A message from kapa.ai
Based on the available knowledge sources, it is not possible to selectively enable or disable Elementary artifact upload on a per-model basis using a variable in the model's config block. The variables that control artifact upload in Elementary (such as
disable_dbt_artifacts_autoupload
,
disable_run_results
, etc.) are designed to be set globally in the
vars
section of your
dbt_project.yml
and are evaluated at the project or environment level—not at the individual model level. The documented and supported approaches are: - Disabling artifact upload globally or by environment/target using variables in `dbt_project.yml`:
Copy code
yaml     vars:       disable_run_results: "{{ target.name != 'prod' }}"       disable_tests_results: "{{ target.name != 'prod' }}"       disable_dbt_artifacts_autoupload: "{{ target.name != 'prod' }}"       disable_dbt_invocation_autoupload: "{{ target.name != 'prod' }}"
This disables artifact uploads for all models except when the target is
prod
, for example. [See FAQ: Can I disable the on-run-end hooks or results uploading?](https://docs.elementary-data.com/oss/general/faq) - Enabling or disabling the entire Elementary package for specific environments:
Copy code
yaml     models:       elementary:         +enabled: "{{ target.name == 'prod' }}"
This disables all Elementary models except in production. There is no support in the knowledge sources for enabling artifact upload on a per-model basis by setting a variable in a model's config block. The control is only available at the project/environment level, not per model. In summary: Your proposed approach (using a variable to disable artifact upload globally and then re-enabling it for specific models via model-level config) is not supported by Elementary OSS according to the current documentation and community discussions. If you need more granular control, this would require a feature request or custom development, as it is not currently possible with the documented configuration options in Elementary OSS [FAQ: Can I disable the on-run-end hooks or results uploading?](https://docs.elementary-data.com/oss/general/faq).