New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate governed dbt builds on Databricks with structural error trapping, isolated telemetry parsing, and Slack notification integration.
Data quality failures in dbt pipelines can prevent reliable data from reaching production. This blueprint combines a Databricks-native dbt job with Kestra orchestration to collect test results, identify failed tests, and notify the team through Slack.
upload_to_uc_volume (io.kestra.plugin.core.http.Request) uploads a CSV directly to a Databricks Unity Catalog volume using the Files API.run_governed_dbt_build (io.kestra.plugin.databricks.job.SubmitRun) triggers a pre-created Databricks dbt job. This is wrapped in an allow_dbt_failure_trap (io.kestra.plugin.core.flow.AllowFailure) block. This block captures the error signal if a dbt test fails (which fails the Databricks job), preventing the flow from stopping so that the subsequent telemetry tasks can execute.fetch_dbt_test_telemetry (io.kestra.plugin.databricks.sql.Query) queries an audit table populated by a dbt on-run-end hook. It specifically looks for the invocation_id corresponding to the job run triggered in step 2 to parse results.evaluate_test_results (io.kestra.plugin.core.flow.If) evaluates the parsed JSON metric dataset. Splits flow routing paths dynamically based on structural error presence or missing data rows to notify Slack.Data Engineers using Databricks and dbt who want to move beyond simple pass/fail pipelines and implement robust data quality alerting without managing external containers.
Kestra bridges the gap between Databricks execution and external communication. While Databricks runs the heavy compute, Kestra handles the logic of what happens when things go wrong, integrating Slack notifications and conditional branching that are difficult to manage within a standard dbt-only environment.
on-run-end hook for telemetry.DATABRICKS_HOST: Your Databricks workspace URL.DATABRICKS_TOKEN: A Personal Access Token.DATABRICKS_HTTP_PATH: The HTTP path for your SQL Warehouse.SLACK_WEBHOOK_URL: Your Slack application incoming webhook.save_test_results macro to your dbt project to enable telemetry.dbt_job_id and volume_path inputs to match your environment.dbt source freshness check as an additional preceding task.total_tests: The total number of dbt test results found for the execution.