Schedule icon
List icon
Download icon
Script icon
If icon
SlackIncomingWebhook icon

Ingest and Validate S3 Data with DuckDB Quality Checks and Slack Alerts

Run automated daily data quality audits on CSV files in Amazon S3 using DuckDB and route incident alerts to Slack with Kestra.

Categories
CloudData

Diagram unavailable

We could not build the topology for this blueprint. The flow itself is valid, use the YAML on the left to run it.

Automate data quality validation across S3 data lakes without spinning up heavy infrastructure. This blueprint monitors an Amazon S3 storage path, pulls incoming CSV datasets into an ephemeral in-memory DuckDB instance, computes per-column completeness scores, and routes real-time Slack alerts if quality degrades below configurable SLAs.

How it works

  1. Scheduled Trigger: The workflow triggers on a daily cron schedule (0 6 * * *) or can be initiated on demand via inputs.
  2. S3 Discovery & Download: Uses io.kestra.plugin.aws.s3.List and io.kestra.plugin.aws.s3.Download to locate and download the targeted data file into the local task runner storage.
  3. In-Memory DuckDB Engine: A containerized Python script invokes DuckDB to parse the CSV, inspect schema metadata with PRAGMA table_info, calculate null ratios for each column, and compute an overall completeness metric.
  4. Quality Gate Decision: An If conditional task compares the calculated score against the user-defined quality_threshold.
  5. Slack Routing: Dispatches formatted rich Slack notifications: red warning blocks on SLA breaches or status confirmations when data is clean.

What you get

  • Automated quality auditing without deploying persistent database clusters.
  • Detailed quality_summary.json output file detailing column-level metrics for audit logging.
  • Proactive alerting directly in your team's Slack incident channel.

Prerequisites

  • A running Kestra instance.
  • AWS IAM credentials with read permissions (s3:GetObject, s3:ListBucket) on the target bucket.
  • A Slack Incoming Webhook URL.

Secrets

  • AWS_ACCESS_KEY_ID: IAM access key ID for AWS authentication.
  • AWS_SECRET_ACCESS_KEY: IAM secret access key for AWS authentication.
  • SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL.

Quick start

  1. Configure secrets AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and SLACK_WEBHOOK_URL in your Kestra namespace.
  2. Deploy this flow into your Kestra instance.
  3. Provide your s3_bucket and s3_prefix in the execution input panel.
  4. Execute the flow and check execution outputs and Slack for confirmation.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.