Skip to content

Configuration for Slack module

This module creates and sends a short report on the latest dbt test results to a specific Slack channel via a Slack bot

Slack requirements

Slack module config variables & CLI commands

  • SLACK_TOKEN: your Slack bot token (e.g. xxxx-123456789101-12345678910-XXXXXXXXXXXXXXXXXXXXXXX)
  • SLACK_CHANNEL: your Slack channel (e.g. your_channel_name)

All Slack configs are currently environment variables, you can set them up using the sample code below:

export SLACK_TOKEN=xxxx-123456789101-12345678910-XXXXXXXXXXXXXXXXXXXXXXX
export SLACK_CHANNEL=your_channel_name

To alert to Slack, use the following:

diqu alert --to slack

Slack message body

Our default Slack message consists of:

  • Thread's header + timestamp
  • A quick summary: errors, warnings, passes, and deprecations count.
  • Top 3 issues:
  • If you have previously defined Priority field in your custom Query, these are the 3 issues with the highest priority.
  • If not, it's 🌟random 🌟

Sample Slack message

🧡 Summary on 2023-11-10 05:47:42.571000:

  • ❗ 3 error(s)
  • πŸ‘€ 3 warning(s)
  • βœ… 2 pass(es)
  • βœ… 0 deprecation(s)

πŸ‘‰ Top 3 Issues:

  • [1] :large_yellow_circle: | Warning in test: accepted_values_my_first_dbt_model_id__False__1__2.ee252c12b8 [dq-tools]
  • [2] :large_yellow_circle: | Warning in test: accepted_values_my_first_dbt_model_id__False__1__2.ee252c12b8 [dq-tools]
  • [3] :large_yellow_circle: | Warning in test: accepted_values_my_first_dbt_model_id__False__1__2.ee252c12b8 [dq-tools]

diqu slack