Audit Qdrant Vector Collection Indexing Health and Status
Audit Qdrant vector collections for operational status degradation and HNSW indexing lag with automated Slack alerts.
Backfill any date-partitioned job with Kestra by day, week or month, with a concurrency limit, KV checkpoints and automatic resume after failures.
Backfilling a year of data usually means a fragile script looping over dates. When it dies at month seven, someone has to work out what already ran, whether re-running is safe, and how to avoid hammering the source. This blueprint turns any date-partitioned job into a safe, resumable backfill. It splits a date range into partitions, runs your job flow once per partition with a concurrency limit, checkpoints every partition that finishes, and when a run fails, the next run picks up exactly where it stopped.
Kestra's built-in backfill replays a flow's Schedule trigger over past dates. This controller is for everything else: jobs that take a date range as input, backfills you want to run in parallel with a cap, and long backfills that need to survive failures and resume without redoing finished work.
plan (io.kestra.plugin.scripts.python.Script) splits start_date to end_date into DAY, WEEK or MONTH partitions. Weeks start on Monday and months on the 1st, so partitions line up with how data is usually stored. Each partition has a start and an exclusive end.checkpoints_before (io.kestra.plugin.core.debug.Return) snapshots each partition's checkpoint from the KV store, so the summary can tell what was already done.run_partitions (io.kestra.plugin.core.flow.Loop) processes two partitions at a time, with transmitFailed: false so one failure doesn't stop the rest. For each partition:skip_or_run (io.kestra.plugin.core.flow.If) skips it if its checkpoint is SUCCESS, unless force is set.run_job (io.kestra.plugin.core.flow.Subflow) runs your job flow with partition_start and partition_end, waits for it, and labels the child execution with the backfill ID and partition.mark_success (io.kestra.plugin.core.kv.Set) checkpoints the partition. If anything fails, mark_failed in the errors branch records FAILED instead. Checkpoints expire after 90 days.summarize compares the checkpoints before and after, and notify posts the result to Slack: done in this run, already done, and failed.fail_if_incomplete (io.kestra.plugin.core.execution.Fail) fails the run while any partition is missing, naming the failed partitions and how to resume.alert_failure in the flow's errors branch posts the failed task, the error and a link to Slack. An incomplete backfill isn't alerted twice, because notify has already reported it. The Slack calls retry 3 times.concurrency limit of 1, so two runs of the controller never process the same backfill at once. A second run waits in the queue.nightly_resume trigger (io.kestra.plugin.core.trigger.Schedule, shipped disabled) re-runs the backfill configured in the input defaults every night. Finished partitions are skipped, so it only retries what's missing, for example data published late.This blueprint ships with an example job, backfill-example-nyc-taxi-monthly, which computes monthly NYC taxi trip metrics with DuckDB from the public TLC Parquet files. Run it once with the defaults to see a real backfill with no account or setup.
backfill_id, and only failed or missing partitions run again.backfill_id and partition, so you can filter them in the UI.A backfill is a long-running, failure-prone loop, which is exactly what scripts handle worst. Kestra runs each partition as its own execution with its own logs, retries and labels. It caps parallelism with concurrencyLimit and records progress in the KV store, which outlives any single run. A backfill can stop and resume across days. Every partition is visible in the UI, and the job flow stays reusable for daily runs.
partition_start and partition_end as DATE inputs (start inclusive, end exclusive) and is safe to re-run for the same partition. The example job does this by overwriting one KV entry per month.SLACK_WEBHOOK_URL: Slack incoming webhook for the backfill summary and failure alerts.job_namespace (STRING, default company.team): namespace of the job flow.job_flow_id (STRING, default backfill-example-nyc-taxi-monthly): flow run once per partition.start_date (DATE, default 2024-01-01): first date of the range. The first partition starts at its boundary, for example the 1st of the month.end_date (DATE, default 2024-06-30): last date of the range, inclusive. The last partition is the one containing this date.granularity (SELECT DAY, WEEK or MONTH, default MONTH): partition size.backfill_id (STRING, default initial-load): names the checkpoints. Re-use it to resume, or change it to backfill the same range again from scratch.force (BOOL, default false): re-run every partition, ignoring checkpoints.{{ outputs.complete }} (flow output): true when every partition has succeeded.{{ outputs.summary }} (flow output): total partitions, done in this run, already done, and the failed partitions.{{ outputs.plan.vars.starts }} and {{ outputs.plan.vars.ends }}: the planned partitions.{{ outputs.run_partitions.terminatedIterations }}: partition outcomes by state for this run.backfill-<backfill_id>-<job_flow_id>-<partition> with value SUCCESS or FAILED.SLACK_WEBHOOK_URL secret.safe-backfill-controller with the defaults. It backfills January to June 2024 with the example job in under a minute.backfill_id retries only them.job_namespace and job_flow_id at your own job flow.concurrencyLimit on run_partitions to match what your source can take.retry to run_job for flaky sources, so transient errors are retried before a partition is marked failed.run_job.inputs, such as a target table or a dry-run flag.nightly_resume with your backfill as the input defaults to let it complete itself as late data arrives.Loop task: https://kestra.io/plugins/core/tasks/flow/io.kestra.plugin.core.flow.loop
Subflow task: https://kestra.io/plugins/core/tasks/flow/io.kestra.plugin.core.flow.subflow
Slack plugin: https://kestra.io/plugins/plugin-slack
KV store: https://kestra.io/docs/concepts/kv-store
Kestra backfills for scheduled flows: https://kestra.io/docs/concepts/backfill
This blueprint has been created by Biplab Bera