New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate GCS to BigQuery ELT workflows with Python data quality anomaly verification and conditional Slack notifications in Kestra.
Ingesting dirty or unvalidated data into enterprise cloud data warehouses like Google BigQuery can break downstream analytics dashboards, invalidate financial reports, and result in costly backfills. Catching malformed records, null foreign keys, and anomalous records before landing into production warehouse tables is essential for robust data engineering.
This blueprint implements a production-grade data quality gate for cloud storage ingestion: it fetches inbound batch datasets, runs automated anomaly and data integrity checks, exports a quality metrics manifest, and dispatches real-time Slack notifications.
fetch_batch_data (io.kestra.plugin.core.http.Request): Downloads the inbound dataset batch from cloud storage (or simulated HTTP data lake endpoint).analyze_data_quality (io.kestra.plugin.scripts.python.Script): Executes a lightweight containerized Python audit that evaluates records for missing required attributes, negative monetary values, and schema anomalies, writing quality_metrics.json.evaluate_quality_gate (io.kestra.plugin.core.flow.If): Assesses the data quality audit result:notify_slack_success (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) sends a confirmation card to the data operations channel.alert_on_failure (errors block): Triggers immediately if any task in the ingestion flow fails, dispatching an urgent Slack incident alert with the execution ID.Coordinating cloud storage transfers, custom Python profiling scripts, conditional quality gates, and communication channels requires fragile cron jobs or monolithic pipeline tools. Kestra provides declarative YAML flow definitions, native Docker containerization, built-in conditional branching, secure secret injection, and comprehensive observability across every pipeline run.
SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint for operational notifications.GCP_SERVICE_ACCOUNT_KEY: (Optional) JSON credentials for Google Cloud service account when writing to BigQuery.SLACK_WEBHOOK_URL secret to your Kestra namespace secrets.daily_ingestion_schedule to match your batch arrival schedule.io.kestra.plugin.gcp.gcs.Download or io.kestra.plugin.gcp.gcs.Trigger to process Google Cloud Storage files directly upon creation.io.kestra.plugin.gcp.bigquery.Load to automatically load verified files into BigQuery tables after quality validation passes.Great Expectations or Soda Core inside the Python script for enterprise-scale quality assertions.