New to Kestra?
Use blueprints to kickstart your first workflows.
Block a publish until Metaplane monitors pass. Kestra re-runs the monitors, polls for fresh results, and fails fast on FAIL or ERROR before shipping data.
Data observability tools tell you when something broke; orchestration decides what happens next. This blueprint wires the two together with io.kestra.plugin.metaplane.Gate, the synchronous quality gate from the Metaplane plugin. Before the publish step runs, the gate triggers a fresh execution of every monitor guarding the tables about to ship, polls until the new results land, and fails the flow the moment any monitor reports a failing status. The publish step only ever executes behind a green gate, and a blocked publish posts to Slack with instructions instead of failing silently.
quality_gate (io.kestra.plugin.metaplane.Gate) receives the list of monitorIds guarding the publish. With runFirst: true it enqueues a fresh run of each monitor instead of trusting whatever result happens to be cached.pollInterval: PT15S) for up to 10 minutes (timeout: PT10M). maxAge: PT1H rejects results older than an hour, so a monitor that never ran again cannot sneak a stale PASS through the gate.failStrategy: FAIL_FAST stops polling and fails the task the moment any single monitor lands in the failOn set, here FAIL and ERROR. The other strategies are FAIL_IF_ANY, which waits for all results before deciding, FAIL_IF_ALL, and NONE, which never fails and only reports through the passed output.publish runs only when the gate passed. It is a stand-in log line; replace it with the real exposure step.notify_published confirms the shipped publish in Slack, and the errors block posts a distinct blocked-publish alert pointing at the gate task logs, where the failing monitor IDs are listed.runFirst plus maxAge means the gate never trusts a stale result.FAIL_FAST, since one failing monitor ends the wait immediately instead of burning the full timeout.Metaplane knows the health of the tables; Kestra owns the moment of decision. Running the gate as a task in the same flow as the publish gives you an atomic, auditable checkpoint: the execution history shows exactly which publishes shipped, which were blocked, and what the monitors said at that moment. No glue code polls the Metaplane API, the Gate task handles enqueueing, polling, staleness, and the failure strategy declaratively.
METAPLANE_API_TOKEN: Metaplane API token.SLACK_WEBHOOK_URL: Slack incoming webhook URL.monitorIds with UUIDs of monitors from your Metaplane workspace.publish stand-in with your real exposure step and enable the nightly_publish trigger.failStrategy: FAIL_IF_ANY when you want the full picture of all monitors before failing, at the cost of waiting for every result.UNKNOWN or FAILED_TO_PREDICT to failOn to treat inconclusive monitors as blockers for high-stakes publishes.failStrategy: NONE and branch on the passed output with io.kestra.plugin.core.flow.If to publish to a quarantine location instead of blocking outright.