Itay Dar
11/05/2023, 12:02 PMOr Avidov
11/05/2023, 2:37 PMmodels:
finance:
+meta:
channel: finance_data_ops
marketing:
+meta:
channel: marketing_data_ops
This will send alerts for all the model errors and the test failures to the relevant channel based on the location of the model in your project. If the model is under the finance folder all the alerts will go to the finacne_data_ops channel.
If you want to limit it only to test alerts, you can do it in your dbt_project.yml as follows (note the tests section) -
tests:
finance:
+meta:
channel: finance_data_ops
marketing:
+meta:
channel: marketing_data_ops
With this method you can invoke one edr monitor command and it will route the alerts to the relevant channels based on the config that you have in your project. You can also define the custom channel in the model itself under the config or meta sections for both models and tests (see this to learn more). If you don't define it for a test but you defined it for a model - we will use the model channel for its associated tests.
Another possible approach is to use tags and our edr selectors as follows -
edr monitor --select tag:finance --slack-channel-name finance_data_ops
edr monitor --select tag:marketing --slack-channel-name marketing_data_ops
With this method you will need to execute edr monitor command per channel one after anotherItay Dar
11/07/2023, 9:49 AM