<@U088WCP3B4P> how can I disable a dbt test from a...
# ask-elementary-ai
a
@kapa.ai how can I disable a dbt test from appearing in the dashboard? I don't want to delete the dbt model.
k
A message from kapa.ai
You have a few options to keep a dbt test from showing up in the Elementary dashboard without deleting the model: - Exclude its results from being uploaded (per-run): - Disable on-run-end uploads (artifacts/tests) for specific runs/environments so ad‑hoc tests don’t reach the dashboard. For example in dbt_project.yml:
Copy code
vars:     disable_tests_results: true     disable_dbt_artifacts_autoupload: true     disable_dbt_invocation_autoupload: true
You can also make these conditional on target (e.g., only disable outside prod). This prevents those test results from appearing in the report (note: the report may be incomplete if you disable uploads) ([Disable on-run-end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks#can-i-disable-the-on-run-end-hooks%3F)). - Filter what appears in the report using tags: - Tag only the tests/models you want included (e.g., “daily” or “critical”) and generate/monitor the report with a selector filtering to those tags (e.g., edr monitor --select tag:critical). This effectively “silences” untagged tests from the dashboard view without deleting them ([Use tags to scope what’s shown](https://slack.com/archives/C02CTC89LAX/p1710871555212829), [Model/test tagging for filtering alerts/report](https://slack.com/archives/C02CTC89LAX/p1681286604141039)). - Disable Elementary package only where needed: - If the goal is to keep local/ad‑hoc activity out of the dashboard, you can enable Elementary only in prod and disable elsewhere so local tests won’t be collected:
Copy code
models:     elementary:       +enabled: "{{ target.name == 'prod' }}"
Or use the vars above to disable just the uploads instead of the entire package ([Disable package or hooks by env](https://slack.com/archives/C02CTC89LAX/p1669625539486519), [Disable hooks per env](https://slack.com/archives/C02CTC89LAX/p1708674780847219)). Notes: - If you remove a test from your project, Elementary will update dbt_tests automatically on the next run; historical results remain in elementary_test_results unless aged out, but the report joins to dbt_tests so deleted tests won’t show in the report anyway ([Auto-update behavior](https://slack.com/archives/C02CTC89LAX/p1679692437666359)).
a
@kapa.ai can I just set enabled=false in the dbt test config?
k
A message from kapa.ai
New message text here
a
@kapa.ai do I need to rerun the tests on my model for elementary to see the change, or is simply disabling the test in the yaml enough for elementary to know not to include it any more?
k
A message from kapa.ai
Simply disabling the test in the YAML is enough. Elementary re-uploads the current set of tests on the next dbt invocation (via on-run-end), and disabled tests are not included in elementary.dbt_tests, so they will drop from the dashboard without needing to re-run that specific test. Just run any dbt command that triggers the on-run-end hook (e.g., dbt run/build/test) so Elementary can sync the updated test set ([Auto-update of dbt_tests](https://slack.com/archives/C02CTC89LAX/p1679692437666359); [Disabled tests excluded from dbt_tests](https://slack.com/archives/C02CTC89LAX/p1732575642412009)).
a
@kapa.ai I'm confused, I DO need to run a dbt command for the changed model? Or just
dbt run --select elementary
?
k
A message from kapa.ai
You don’t need to re-run the specific test, but you do need to execute any dbt command that triggers Elementary’s on-run-end (e.g., dbt run/build/test) so it can sync the updated test set and drop the disabled test. You do not have to run dbt run --select elementary unless you’ve disabled Elementary models and only update them explicitly, or you’re upgrading Elementary models; otherwise, a normal dbt invocation is enough ([Auto-update of dbt_tests](https://slack.com/archives/C02CTC89LAX/p1679692437666359); [Elementary models only needed on setup/upgrades](https://slack.com/archives/C02CTC89LAX/p1668088517905629), [FAQ: excluding/controlling models](https://docs.elementary-data.com/oss/general/faq)).
a
OK so any general dbt command is sufficient, thanks for clarifying