This message was deleted.
# ask-elementary-ai
s
This message was deleted.
k
A message from kapa.ai
Yes, you can use the Elementary OSS package with dbt to send Slack alerts for dbt tests that have a WARN status. Elementary supports alerting on both errors and warnings for dbt tests. To achieve this, ensure the following: 1. Elementary Setup: Install the Elementary dbt package, configure your dbt profile, and install the Elementary CLI. Set up your Slack integration by creating a Slack app, adding the required permissions, and providing the token or webhook to Elementary, either via CLI parameters or a
config.yml
file. Detailed setup instructions are available in the [official guide](https://docs.elementary-data.com/oss/guides/alerts/send-slack-alerts). 2. Airflow Integration: In your Airflow DAG, run
dbt test
before running
edr monitor
. This ensures that Elementary has the latest test results to process and alert on. A typical Airflow DAG sequence would be:
Copy code
python     dbt_run >> dbt_test >> edr_monitor
where
edr_monitor
is called with the appropriate Slack parameters or relies on your
config.yml
configuration. Example Airflow code is provided in the knowledge sources and can be adapted to your environment<sup>[Airflow orchestration example](https://slack.com/archives/C02CTC89LAX/p1662015570988829)</sup>. 3. Alerting on WARN Status: By default, Elementary can send alerts for both errors and warnings. If you are not receiving alerts for warnings, check that you have not set the
disable_warn_alerts
variable to
true
in your
dbt_project.yml
or via CLI/dbt vars. This variable controls whether warning alerts are generated. It should be set to
false
(or omitted, as the default is
false
) to enable warning alerts<sup>[disable_warn_alerts explanation](https://slack.com/archives/C02CTC89LAX/p1673893162838399)</sup>. 4. Filtering Alerts: If you want to receive only warning alerts (and not errors), you can use tags and the
--select
option with
edr monitor
, or filter by status as described in the documentation. For example:
Copy code
edr monitor --select tag:elementary
This will only send alerts for tests tagged with
elementary
. You can also use alert filters to further customize which alerts are sent<sup>[Filtering and configuration](https://slack.com/archives/C02CTC89LAX/p1673893162838399)</sup>. 5. Troubleshooting: If you are not receiving warning alerts, ensure: - The relevant tests are actually failing with a WARN status. - The
disable_warn_alerts
variable is not set to
true
. - The Elementary models are not being materialized as tables (which can prevent proper refreshing of alert views)<sup>[Materialization issue](https://slack.com/archives/C02CTC89LAX/p1697784304685269)</sup>. - You are running
edr monitor
after
dbt test
and within the correct time window (use
--days-back
if needed). In summary, Elementary OSS fully supports sending Slack alerts for dbt tests with WARN status, and you can control this behavior through configuration and CLI options. If you encounter issues, double-check your configuration and the order of operations in your Airflow pipeline<sup>[Slack alerts setup](https://docs.elementary-data.com/oss/guides/alerts/send-slack-alerts)</sup>.