<@U088WCP3B4P> Is it possible to exclude artifacts...
# ask-elementary-ai
l
@kapa.ai Is it possible to exclude artifacts table in certain runs from dbt?
k
A message from kapa.ai
Yes, it is possible to exclude the upload of dbt artifacts tables in certain runs by configuring the appropriate variables in your
dbt_project.yml
or by passing them as command-line variables. Specifically, you can use the
disable_dbt_artifacts_autoupload
variable to control whether artifact metadata is uploaded during the
on-run-end
hook. For example, to disable artifact uploads except in production, you can set:
Copy code
yaml vars:   disable_dbt_artifacts_autoupload: "{{ target.name != 'prod' }}"
This will prevent artifact uploads in all environments except when the target is
prod
. You can also set this variable directly in your dbt command:
Copy code
bash dbt run --vars '{"disable_dbt_artifacts_autoupload": true}'
If you want to disable only specific artifact tables (like
dbt_columns
), there are more granular variables such as
disable_dbt_columns_autoupload
available as well. Keep in mind that disabling artifact uploads may result in missing or outdated metadata in Elementary reports and alerts. If you disable artifact autoupload, it is recommended to run the relevant Elementary models manually when you need to update the metadata, for example:
Copy code
bash dbt run --select elementary.edr.dbt_artifacts
For more details, see the official documentation: [Can I disable the on-run-end hooks?](https://docs.elementary-data.com/dbt/on-run-end_hooks#can-i-disable-the-on-run-end-hooks) and [FAQ](https://docs.elementary-data.com/oss/general/faq).