<@U088WCP3B4P> if I run the command dbt run --sele...
# ask-elementary-ai
i
@kapa.ai if I run the command dbt run --select elementary.edr.dbt_artifacts why are also the alerts triggered and sent to slack? how can I avoid it?
k
A message from kapa.ai
When you run the command:
Copy code
dbt run --select elementary.edr.dbt_artifacts
it should only execute the models related to uploading dbt artifacts (project metadata) and not trigger or send alerts to Slack. However, if you are seeing alerts being sent, it could be due to one of the following reasons: 1. On-run-end Hooks: If you have not disabled the on-run-end hooks in your dbt project, these hooks might still be uploading run/test results or triggering other Elementary processes that could result in alerts being sent. To prevent this, you can disable the relevant hooks by setting the following in your `dbt_project.yml`:
Copy code
yaml    vars:      disable_dbt_artifacts_autoupload: true      disable_run_results: true      disable_tests_results: true      disable_dbt_invocation_autoupload: true
This will ensure that only the artifact upload runs, and not the hooks that might trigger alerts or upload results that could lead to alerts being sent [Disable on-run-end hooks](https://slack.com/archives/C02CTC89LAX/p1667490083476359). 2. Existing Alerts in Incremental Tables: If there are already unsent alerts in the incremental tables (
alerts
,
alerts_models
, etc.), running any Elementary process that interacts with these tables (including artifact uploads, depending on your setup) could cause those alerts to be sent. In this case, you may need to clear out the relevant tables or ensure that your workflow does not trigger the alert-sending logic. 3. Misconfiguration or Overlapping Model Selection: Double-check that your selector (
elementary.edr.dbt_artifacts
) is not inadvertently including other Elementary models that handle alerting. The correct selector should only target the artifact upload models [Artifact upload control](https://slack.com/archives/C02CTC89LAX/p1689186975724739). Summary: To avoid triggering and sending alerts when running only the artifact upload, ensure you have disabled the on-run-end hooks as shown above, and confirm that your selector is precise. If alerts are still being sent, check for unsent alerts in the incremental tables and clear them if necessary. If you continue to experience issues, please provide more details about your dbt project configuration and any custom hooks or commands you are running.