New to Kestra?
Use blueprints to kickstart your first workflows.
Declarative Lakehouse curation pipeline that audits raw batch data in DuckDB, enforces quality gates, exports analytical Parquet, and alerts Slack.
Modern analytics teams often face a dilemma: provisioning a full cloud data warehouse (Snowflake, BigQuery, Redshift) is costly and complex for staging workflows, while basic shell scripts lack auditability, scheduling, and error isolation.
This blueprint implements a serverless, zero-warehouse Lakehouse curation pipeline powered by embedded DuckDB and Kestra. It downloads raw transactional batches, validates data quality in memory (checking for empty sets, null primary keys, and invalid amounts), applies window functions to enrich customer spend ranks, stores the curated dataset as compressed columnar Parquet, and broadcasts a KPI scorecard straight to Slack.
daily_lakehouse_schedule trigger (io.kestra.plugin.core.trigger.Schedule) fires automatically at 06:00 UTC, or runs on-demand with custom input URLs.fetch_raw_batch task (io.kestra.plugin.core.http.Download) pulls the target CSV file into Kestra managed storage.validate_and_profile task (io.kestra.plugin.jdbc.duckdb.Queries) uses DuckDB to audit the data in memory. With fetchType: FETCH, it extracts row counts, null counts, and financial totals into task outputs.quality_gate flowable task (io.kestra.plugin.core.flow.If) verifies that total rows satisfy min_expected_rows and that zero corrupt primary keys or non-positive totals exist.curate_and_export_parquet applies analytical window aggregations (AVG() OVER (PARTITION BY ...) and DENSE_RANK()) and persists the output via fetchType: STORE as an optimized internal artifact.notify_slack_kpi task (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) dispatches a rich message containing revenue and customer metrics.export_curation_metadata task records execution lineage and quality verification flags for compliance audits.DuckDB is an analytical execution engine, but it cannot schedule recurring jobs, trigger notifications, enforce branching workflows, or store execution state. Kestra turns DuckDB into a resilient data platform: tasks can be chained, secrets are secured, quality gates branch conditionally, and all intermediate artifacts are managed with reproducible lineage.
SLACK_WEBHOOK_URL: Your Slack Incoming Webhook URL. If omitted for local testing, the quality gate handles standard execution without external side-effects.SLACK_WEBHOOK_URL secret if Slack alerting is desired.io.kestra.plugin.aws.s3.Upload or io.kestra.plugin.gcp.gcs.Upload inside the then: block to sync the curated Parquet file to an external cloud data lake.io.kestra.plugin.notifications.mail.MailSend for executive email reporting.inputs.data_url to pre-signed S3 or GCS URLs for private internal datasets.