Ashley Mui
03/31/2026, 11:27 PMprod profile and an additional one called uat, and I need monitoring and alerts on both. We have also altered the generate_schema_name macro to add a prefix to schema names for the uat profile, like so:
{%- elif target.name == 'uat' -%}
uat_{{ generate_schema_name_for_env(custom_schema_name, node) }}
{%- endif -%}
I have set up elementary output profiles in the profiles.yml file, but only for prod, do I need to set one up for uat too?
Currently elementary Slack alerting works for prod, but not for jobs running under the uat profilekapa.ai
03/31/2026, 11:27 PMAshley Mui
04/01/2026, 6:13 PMkapa.ai
04/01/2026, 6:14 PMelementary in your profiles.yml file. This is separate from your main dbt project profile(s) (e.g., prod, uat). The edr CLI looks specifically for a profile named elementary to know where to connect to the data warehouse. [CLI install guide]
The easiest way to generate it is:
dbt run-operation elementary.generate_elementary_cli_profile
A typical multi-environment setup looks like this:
# Your existing dbt project profile
my_project:
target: prod
outputs:
prod:
type: snowflake
schema: my_schema
# ...
uat:
type: snowflake
schema: uat_my_schema
# ...
# Elementary's dedicated profile (top-level, same indentation)
elementary:
target: prod
outputs:
prod:
type: snowflake
schema: my_schema_elementary # must match where Elementary tables are created
# ...
uat:
type: snowflake
schema: uat_my_schema_elementary # must match where Elementary tables are created for uat
# ...
The elementary profile block must be a top-level entry, at the same indentation level as your other profiles. [Slack discussion] Key Rule: Schema Must Match Exactly The schema value in the elementary profile must literally match the schema where the Elementary dbt package tables are physically created. The edr CLI does not use your custom generate_schema_name macro — it only reads the static schema value from the elementary profile. [GitHub issue]
This is why, in your case, you need to set the schema for the uat target to whatever schema your custom macro resolves to (e.g., uat_my_schema_elementary). Selecting the Right Target Use the --profile-target (or -t) flag to tell edr which target to use within the elementary profile:
edr monitor --profile-target prod # uses prod Elementary tables
edr monitor --profile-target uat # uses uat Elementary tables
The --env flag is purely cosmetic — it only controls the label shown in reports and Slack alerts, not which database/schema is used. [Slack discussion] Backend Tables Populated for Slack Alerting The Elementary dbt package writes its data into the schema you configure (e.g., my_schema_elementary). The key table used for alerting is elementary_test_results, which stores the outcomes of your dbt test runs. [CLI install guide]
More broadly, the Elementary package creates various models to store:
• dbt artifacts (metadata about your project, models, sources)
• test results (pass/fail outcomes, anomaly detection results)
• run results (collected automatically as part of your dbt runs)
These are populated when you run dbt test, dbt build, or dbt run with the Elementary package installed. The edr monitor command then reads from these tables (via the elementary profile) to generate and send Slack alerts. [Elementary in production]
The knowledge sources do not provide an exhaustive list of every backend table, but elementary_test_results is explicitly mentioned as the primary table the CLI reads from to determine alert content. 👍 0 button 👎 0 button ℹ️ Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Ashley Mui
04/01/2026, 6:23 PMkapa.ai
04/01/2026, 6:23 PMalerts_v2 table is Elementary's central alert tracking table, introduced in version 0.14.0 to replace the older alerts_dbt_models and related views. [alerts_dbt_models deprecated]
Here's what it represents and how it works: What alerts_v2 Contains It stores all pending and sent alerts across all alert types — test failures/warnings, model errors, and source freshness issues. You can query it by type, e.g.:
select * from <elementary_schema>.alerts_v2 where type = 'model'
Each row includes a data JSON column with rich alert context such as:
• id, alert_class_id, model_unique_id, test_unique_id
• detected_at, database_name, schema_name, table_name, column_name
• test_type, test_sub_type, test_results_description
• owners, tags, test_rows_sample, severity, status
• test_params, test_meta, model_meta
It also has a sent_at column to track when an alert was dispatched. [alerts_v2 structure] How It's Used in the Alerting Flow When edr monitor runs, it follows this sequence: [duplicate alerts explanation]
1. Populates alerts_v2 from all artifacts the Elementary dbt package has collected (incrementally).
2. Filters the relevant alerts according to any --filters arguments you pass.
3. Sends the alerts to Slack (or other destinations).
4. Updates the rows in alerts_v2 to mark them as sent (recording sent_at). Key Characteristics • It is an incremental table — rows are merged/inserted rather than the table being recreated on each run. [incremental model]
• Alert rows have a status field (e.g., pending, skipped, sent). A skipped status typically means the test was not executed or was suppressed.
• Running multiple edr monitor commands simultaneously can cause duplicate rows, because both runs see the same "no alerts exist yet" state and both create them. The workaround is to run them sequentially. [duplicate alerts] 👍 0 button 👎 0 button ℹ️ Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Ashley Mui
04/01/2026, 7:08 PM-t, --profile-target <target_name>
• Profile target of your dbt project: Choose a specific target in case you have multiple targets for your dbt project.
--project-profile-target <target_name>kapa.ai
04/01/2026, 7:08 PM