<@U088WCP3B4P> Can I exclude some tests from the r...
# ask-elementary-ai
f
@kapa.ai Can I exclude some tests from the reporting in Elementary ? I want to exclude a dbt package
k
A message from kapa.ai
Yes, you can exclude specific tests or packages from Elementary reporting. There are several approaches depending on your exact needs: ### Excluding Elementary Tests You can exclude Elementary tests from your dbt runs using the tag selector:
Copy code
dbt build --exclude elementary
Or specifically for Elementary tests:
Copy code
dbt test --exclude tag:elementary-tests
### Excluding Package Models from Reports For excluding specific packages from appearing in the Elementary dashboard, this is a known issue that many users have encountered. Currently, there isn't a direct configuration to exclude specific packages from the report UI, but there are some workarounds: 1. Use dbt selectors when running dbt: By using
--exclude
flags in your dbt commands, you can prevent certain models from being included in your runs, which means they won't appear in Elementary's data collection. 2. Disable Elementary for specific runs: You can configure Elementary to be disabled for certain environments or runs by using variables in your `dbt_project.yml`:
Copy code
vars:   disable_run_results: "{{ target.name not in ['prod','analytics'] }}"   disable_tests_results: "{{ target.name != 'prod' }}"   disable_dbt_artifacts_autoupload: "{{ target.name != 'prod' }}"   disable_dbt_invocation_autoupload: "{{ target.name != 'prod' }}"
3. Exclude specific tests by name: You can exclude tests by their name pattern:
Copy code
dbt build --exclude test_name:schema_changes
There is an open GitHub issue ([ELE-422](https://github.com/elementary-data/elementary/issues/695)) about excluding package models from the dashboard, which indicates this is a feature the Elementary team is aware of and considering for improvement. For filtering in the report itself, the options are more limited. The
edr send-report
command supports
--select tag/model...
but this only affects the monitoring summary in the head and still includes the full HTML file with all tests.