<@U088WCP3B4P> If in dbt I have a yml file like th...
# ask-elementary-ai
y
@kapa.ai If in dbt I have a yml file like this: version: 2 sources: - name: aaa_name database: prod schema: aaa_name tables: - name: aaa_table config: freshness: error_after: period: day count: 7 meta: channel: channel_1 then in airflow I have a DAG like this:
Copy code
dag_id="elementary_edr_send_slack_report",
        arguments=[
            "edr",
            "monitor",
            "--select",
            "statuses:fail",
            "--slack-channel-name",
            "channel_2",
        ],
        pool="dbt",
    )
then when the freshness test of the table aaa_table fails in airflow, the notification would be sent to which channel?
k
Based on the knowledge sources, the alert would be sent to
channel_1
(the channel defined in the YAML
meta
). Here's why: • The
--slack-channel-name
specified in the
edr monitor
command is the default channel, used only for alerts that are not attributed to any custom channel in
meta
. [Send Slack alerts] • When a custom
channel
is explicitly defined in the resource's
meta
(as
channel: channel_1
is in your YAML), that takes precedence over the CLI default. [Custom channel explainer] So in your case: •
channel_1
(from
meta
) → wins, because it's a resource-level custom channel. •
channel_2
(from
--slack-channel-name
) → would only be used for alerts that have no custom channel defined in their
meta
. If you wanted the alert to go to
channel_2
instead, you would need to remove the
channel: channel_1
from the
meta
block in your YAML. 👍 0 button 👎 0 button ℹ️ Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.