<@U088WCP3B4P> Hello! We have multiple runs of DBT...
# ask-elementary-ai
e
@kapa.ai Hello! We have multiple runs of DBT in prod (i.e. main, weekly, monthly etc.). Is there any way to distinguish them in the Elementary report?
k
A message from kapa.ai
Elementary does not natively provide a built-in feature to automatically distinguish between different types of dbt runs (e.g., main, weekly, monthly) within a single environment in the report UI. However, there are a few approaches and workarounds you can consider: 1. Tagging and Filtering: You can use dbt tags to label your models or tests according to the run type (e.g.,
main
,
weekly
,
monthly
). In the Elementary report UI, you can then filter by these tags to view results relevant to each run type. This allows you to focus on specific subsets of your data, but it does not create separate sections in the report for each run type automatically. Filtering is done in the sidebar of the report UI, as described in user discussions and support responses [Slack thread](https://slack.com/archives/C02CTC89LAX/p1669737256245109). 2. Filtering by Invocation: Elementary supports generating a report filtered by a specific dbt invocation (i.e., a specific run of
dbt test
or
dbt build
). You can generate a report for the last invocation, by invocation time, or by invocation ID using the
--select
flag with
edr report
. For example:
Copy code
edr report --select last_invocation    edr report --select "invocation_time:2022-12-25 10:10:35"    edr report --select invocation_id:XXXXXXXXXXXXX
This will limit the report to the results of a specific run, which can help you distinguish between different scheduled runs if you know their invocation details. However, this does not aggregate or group runs by type (main, weekly, monthly) unless you manage invocation metadata externally or via naming conventions [Generate observability report](https://docs.elementary-data.com/oss/guides/generate-report-ui). 3. Custom Naming or Metadata: Some users have worked around limitations by using different test names, aliases, or tags for different run types, but this can require duplicating test definitions and careful management. There is a known limitation where Elementary may only treat the first instance of each unique test name per model, so using unique names/aliases for different run types is necessary if you want them to appear separately in the report [Slack thread](https://slack.com/archives/C02CTC89LAX/p1693490863570299). 4. Disabling Elementary for Ad-hoc Runs: If you want to ensure only scheduled runs (e.g., daily, weekly) are included in the report, you can disable Elementary's on-run-end hooks for ad-hoc runs using a variable or by configuring your dbt project accordingly. This prevents ad-hoc runs from polluting your main report data [Slack thread](https://slack.com/archives/C02CTC89LAX/p1710871555212829). Summary: While you cannot natively group or label runs as "main", "weekly", or "monthly" in the Elementary report UI, you can use tags, invocation filtering, and careful test naming to approximate this distinction. For more advanced separation, you may need to manage metadata or generate separate reports for each run type. If you have a specific workflow or need more granular separation, please provide more details, and I can suggest a more tailored workaround.