New to Kestra?
Use blueprints to kickstart your first workflows.
Schedule dbt Core models and tests with Kestra, post success to Slack, and fire an automatic failure alert when a run or test breaks.
Run dbt Core models and tests on a fixed schedule and make data quality failures impossible to miss. This blueprint orchestrates a nightly dbt Core pipeline that installs project dependencies, builds your models, runs your tests, and posts the result to Slack. If any step fails, an error handler fires a separate failure alert so broken transformations and failing tests surface the same night they happen, instead of being discovered by a stakeholder the next morning.
nightly_run trigger (io.kestra.plugin.core.trigger.Schedule, cron 0 2 * * *, shipped disabled) starts the flow on a cadence.build_models runs io.kestra.plugin.dbt.cli.DbtCLI inside a Docker task runner using the ghcr.io/kestra-io/dbt-duckdb image, with namespaceFiles enabled to load your dbt project, then executes dbt deps and dbt run.test_models runs DbtCLI again with the same image and namespaceFiles to execute dbt test and validate data quality.notify_success posts a confirmation to Slack via io.kestra.plugin.slack.notifications.SlackIncomingWebhook.notify_failure error handler sends a SlackIncomingWebhook alert tagged with the failing execution.id.dbt test.dbt itself has no scheduler, no retry logic, and no native alerting. Kestra adds event and schedule triggers, automatic retries, full execution lineage and logs, and declarative YAML you can version control. The errors block guarantees that a failed dbt run or dbt test always produces an alert, something a bare dbt invocation in cron cannot do.
SLACK_WEBHOOK_URL: Slack incoming webhook URL used for both the success and failure notifications.You also need your dbt project (including profiles.yml) uploaded as namespace files so namespaceFiles can load it into the task working directory.
SLACK_WEBHOOK_URL in your Kestra namespace.namespaceFiles can load it.nightly_run schedule (it ships disabled) to run at 02:00 daily.ghcr.io/kestra-io/dbt-duckdb for the adapter image matching your warehouse (Snowflake, BigQuery, Postgres, and so on).retry to the dbt tasks to recover from transient warehouse errors.dbt run output to the Slack message.