New to Kestra?
Use blueprints to kickstart your first workflows.
Treat bad data as an incident. Kestra profiles a batch, computes the null rate, and pages Squadcast with rates and row counts when the threshold is breached.
Data quality failures usually travel by email, a report someone reads next Tuesday, long after the bad batch reached every dashboard downstream. This blueprint treats a breached quality threshold the way infrastructure teams treat a down host, it pages. A Python task profiles the latest batch and emits the null rate of a key column through Kestra's output protocol; an If gate compares it to the max_null_rate input; a breach opens a Squadcast incident through io.kestra.plugin.squadcast.SquadcastIncomingWebhook carrying the measured rate, the threshold, and the affected row counts.
profile_orders (io.kestra.plugin.scripts.python.Script) computes null_count, row_count, and null_rate over an inline sample batch, then prints them through the ::{"outputs": {...}}:: protocol, making them available as {{ outputs.profile_orders.vars.* }}. In production the script reads the batch your pipeline just loaded.quality_gate (io.kestra.plugin.core.flow.If) branches on null_rate > inputs.max_null_rate.page_quality_incident posts a JSON payload with status: trigger, the execution id as event_id, and tags naming the check and the column, and a description with the exact numbers, so on-call sees blast radius before opening Kestra.log_quality_ok records the rate, building a quality history inside the execution log.errors block reports to Discord when the gate itself fails, because an unprofiled batch is indistinguishable from a clean one.A quality gate needs to run right after the load, see the same data, branch on the result, and page with context. Kestra provides all four in one flow, the Python task emits metrics as first-class outputs, the If task routes on them, and the Squadcast task turns a number into an incident, with the whole decision auditable in the execution history.
SQUADCAST_WEBHOOK_URL: the full Squadcast incoming webhook endpoint, including its token.DISCORD_WEBHOOK_URL: Discord incoming webhook URL for the fallback alert.max_null_rate to 0.5 and rerun to see the quiet passing path.profile_orders at your real batch, for example by reading the table your load task just wrote, and route the Squadcast service to the team that owns the dataset.