how to disable warn alerts in elementary slack ale...
# ask-elementary-ai
f
how to disable warn alerts in elementary slack alert
k
A message from kapa.ai
To disable warn alerts in Elementary Slack alerts, you need to set the variable
disable_warn_alerts
to
true
in your
dbt_project.yml
file under the
vars
section. Here’s how you can do it:
Copy code
yaml vars:   disable_warn_alerts: true
This configuration will prevent Elementary from generating and sending alerts for tests with severity set to
warn
in Slack. Make sure this is placed directly under the
vars
key, not nested under any model or package-specific section. After updating your configuration, you may need to re-run the relevant dbt commands to ensure the changes take effect, such as rebuilding the Elementary alert views if necessary. For reference and further details, see the discussion and confirmation from Elementary support staff: [Slack thread on disabling warn alerts](https://slack.com/archives/C02CTC89LAX/p1685631907795679), [Another example](https://slack.com/archives/C02CTC89LAX/p1684237913992769).
f
does this work for the latest elementary package?
@kapa.ai does this work for the latest elementary package?
k
A message from kapa.ai
Yes, based on the most recent discussions in the knowledge sources, setting
disable_warn_alerts: true
in your
dbt_project.yml
under the
vars
section is still the recommended way to disable warn alerts in Elementary Slack alerts. This approach is confirmed to work with recent versions of the Elementary package (e.g., 0.7.8 and above) and is referenced in support responses as the correct method. If you update this variable, you may need to re-run
dbt run -s edr.alerts
to ensure the changes take effect, as the variable is used when building the alert views [Disable warn alerts in dbt_project.yml](https://slack.com/archives/C02CTC89LAX/p1684952389587259) [Support confirmation](https://slack.com/archives/C02CTC89LAX/p1684237913992769). If you encounter issues, ensure you have re-built the relevant Elementary models after changing the variable. There is no indication in the knowledge sources that this method has changed or been deprecated in the latest package versions.
f
@kapa.ai though it's set as
disable_warn_alerts: true
in my
dbt_project.yml
it still isn't working. Is there any other way?
k
A message from kapa.ai
If setting
disable_warn_alerts: true
in your
dbt_project.yml
is not working, there are a few troubleshooting steps and considerations based on the knowledge sources: 1. Rebuild Elementary Alert Views: After changing the variable, you need to rebuild the Elementary alert views for the change to take effect. Run:
Copy code
dbt run -s edr.alerts
or
Copy code
dbt run -s elementary
This step is necessary because the variable is used when creating the alert views, and changes won't apply until the views are rebuilt [see here](https://slack.com/archives/C02CTC89LAX/p1684952389587259) [and here](https://slack.com/archives/C02CTC89LAX/p1666602041616139). 2. Clear Existing Alerts: If you are still receiving warn alerts, it could be because alerts were already aggregated in the
alerts
table before you changed the configuration. You may need to truncate the
alerts
table in your Elementary schema:
Copy code
TRUNCATE TABLE <elementary_schema>.alerts
This will remove existing alerts, so only new alerts (with the updated config) will be sent [reference](https://slack.com/archives/C02CTC89LAX/p1666602041616139). 3. Check for Multiple Configurations: Make sure
disable_warn_alerts: true
is set directly under the
vars
key in your
dbt_project.yml
, not nested under another section or package. The correct placement is:
Copy code
yaml    vars:      disable_warn_alerts: true
[Correct placement example](https://slack.com/archives/C02CTC89LAX/p1684237913992769). 4. Command-Line Overrides: If you are using the
--dbt-vars
flag with
edr monitor
, ensure you wrap the JSON in single quotes:
Copy code
edr monitor --dbt-vars '{"disable_warn_alerts": "true"}'
[See this tip](https://slack.com/archives/C02CTC89LAX/p1685631907795679). If you have followed all these steps and warn alerts are still being sent, there may be an issue specific to your setup or a bug. In that case, it is recommended to reach out to Elementary support or check the logs for further debugging. Let me know if you need help with any of these steps!