New to Kestra?
Use blueprints to kickstart your first workflows.
Extract and sync Hacker News data to CSV files using CloudQuery and Kestra. A data ingestion blueprint for analytics and downstream data pipelines.
Build a CloudQuery data ingestion pipeline that extracts every Hacker News table and lands it on disk as structured CSV files, ready for analytics, exploration, or downstream processing. Instead of running CloudQuery by hand and wiring up your own scheduling, retries, and config management, this blueprint runs the CloudQuery CLI as a fully orchestrated Kestra task with inline source and destination configuration. It is a clean starting point for anyone evaluating CloudQuery as an extract engine or standardizing API to file ingestion as repeatable code.
hn_to_parquet task uses io.kestra.plugin.cloudquery.CloudQueryCLI to run the CloudQuery CLI directly inside Kestra.inputFiles entry, config.yml, defines both the CloudQuery source and destination as a single multi-document YAML spec.cloudquery/hackernews (v3.7.7), syncing all tables (tables: ["*"]) with item_concurrency: 100 and an incremental start_time derived from {{ execution.startDate | dateAdd(-1, 'DAYS') }}.cloudquery/file (v5.4.6) with format: csv, writing one path per table using the CloudQuery {{TABLE}} and {{UUID}} placeholders. These are wrapped in raw blocks so Kestra does not parse them as Pebble expressions.commands block runs cloudquery sync config.yml, and outputFiles captures every generated **/*.csv file as a Kestra output for use by downstream tasks.The CloudQuery CLI syncs data, but it has no built in scheduler, retry policy, dependency graph, or run history. Kestra adds event and schedule triggers, automatic retries, execution logs, output lineage, and a declarative YAML definition that lives in version control. You get observability and reusability across many syncs instead of a one off command on a cron line that nobody can audit.
env as CLOUDQUERY_API_KEY).CLOUDQUERY_API_KEY: the CloudQuery API key used to authenticate connectors. The task env reads it as {{ secret('CLOUDQUERY_API_KEY') }}, so store the key in your secret backend rather than hardcoding it.CLOUDQUERY_API_KEY secret to your Kestra instance with your own key (see the CloudQuery introduction blog post).namespace to match your environment.hn_to_parquet task.cloudquery/hackernews for any other CloudQuery source plugin to ingest a different system.cloudquery/file to a warehouse such as BigQuery, Snowflake, or PostgreSQL, or to cloud storage.format: csv to Parquet or JSON for analytics ready outputs.Schedule trigger and downstream tasks to load the CSV into a database or run dbt transformations.