hi <@U088WCP3B4P>, how to integrate my dbt element...
# ask-elementary-ai
a
hi @kapa.ai, how to integrate my dbt elementary to get notification in slack ... iam using dbt core
k
A message from kapa.ai
To integrate Elementary with your dbt Core project and receive notifications in Slack, follow these steps: 1. Install the Elementary dbt package and CLI - Add the Elementary dbt package to your
packages.yml
. - Install the Elementary CLI and configure your dbt profile as described in the [quickstart guide](https://docs.elementary-data.com/oss/quickstart/quickstart-cli-package). 2. Create a Slack App - Go to the [Slack app creation page](https://api.slack.com/apps?new_app=1) and create a new app for your workspace. - (Optional) Customize the app display and icon. 3. Set Up Slack Integration - Token method (recommended): - In your Slack app, go to "OAuth & Permissions" and add these Bot Token Scopes: -
channels:join
-
channels:read
-
chat:write
-
files:write
-
users:read
-
users:read.email
-
groups:read
- Install the app to your workspace to generate a Slack token. - Webhook method (alternative): - Enable "Incoming Webhooks" in your Slack app. - Add a new webhook to the desired channel and copy the webhook URL. 4. Configure Elementary to Use Slack - You can pass the Slack token or webhook directly as CLI parameters or via a config file. - Using CLI parameters: - For token:
Copy code
edr monitor --slack-token <your_slack_token> --slack-channel-name <slack_channel>
- For webhook:
Copy code
edr monitor --slack-webhook <your_slack_webhook_url>
- Using a config file (
~/.edr/config.yml
):
- For token:
Copy code
yaml        slack:          token: <your_slack_token>          channel_name: <slack_channel>          group_alerts_by: table  # or alert
- For webhook:
Copy code
yaml        slack:          notification_webhook: <your_slack_webhook_url>          group_alerts_by: table  # or alert
5. Run Your dbt Tests and Send Alerts - After running your dbt models and tests (e.g.,
dbt run
and
dbt test
), execute:
Copy code
edr monitor
- This will send alerts to your configured Slack channel for any detected issues. For more details and troubleshooting, see the official [Elementary Slack setup guide](https://docs.elementary-data.com/oss/deployment-and-configuration/slack) and [Slack alerts guide](https://docs.elementary-data.com/oss/guides/alerts/send-slack-alerts). If you encounter issues, make sure your Slack app has the correct permissions and is installed in your workspace. Also, ensure your Elementary CLI and dbt package are properly configured and up to date. [Reference: Elementary OSS Slack Setup](https://docs.elementary-data.com/oss/deployment-and-configuration/slack) [Reference: Setup Slack Alerts](https://docs.elementary-data.com/oss/guides/alerts/send-slack-alerts)