New to Kestra?
Use blueprints to kickstart your first workflows.
Query top 10 daily Wikipedia page views from BigQuery public data, export to CSV, and analyze with Python Pandas in Docker, orchestrated by Kestra.
Combine Google BigQuery, CSV serialization, and Python Pandas to extract and analyze the top 10 most viewed Wikipedia pages of the current day. This blueprint queries the public bigquery-public-data.wikipedia.pageviews_2024 dataset, converts the result set into CSV, then runs a containerized Pandas script to compute the maximum view count and publish it as a tracked Kestra output. Use it as a starting point for content analytics, trending topic detection, public dataset exploration, or any pipeline that mixes SQL warehouses with Python data science tooling.
io.kestra.plugin.gcp.bigquery.Query runs a parameterized SQL query against the public Wikipedia pageviews table, filtered to today's English-language pages, ordered by hour and views, limited to the top 10 rows. fetchType: STORE writes the result to Kestra internal storage as an Ion file.io.kestra.plugin.serdes.csv.IonToCsv converts the Ion result into a portable CSV file consumable by any downstream tool.io.kestra.plugin.scripts.python.Script runs inside a Docker task runner (io.kestra.plugin.scripts.runner.docker.Docker) with pandas and kestra installed. It reads the CSV via inputFiles, loads it into a DataFrame, and emits the peak view count using Kestra.outputs({'views': int(views)}).views) you can graph over time on the Outputs tabtotal.bytes.billed, total.partitions.processed, rows processed, query durationBigQuery's scheduled queries can run SQL on a cron, but they cannot hand results off to a Python container, capture custom application metrics, or branch on values computed in code. Kestra closes that gap: event or schedule triggers fire the query, retries handle transient API errors, the Ion to CSV step gives you a stable artifact, and the Docker-backed Python task adds full data science tooling. Every run produces lineage, logs, metrics, and outputs you can chart, alert on, or feed into downstream flows, all from declarative YAML.
roles/bigquery.jobUser and roles/bigquery.dataViewerGCP_SERVICE_ACCOUNT_JSON: full JSON content of the GCP service account key used by the BigQuery query taskGCP_SERVICE_ACCOUNT_JSON secret to your Kestra instance.projectId: test-project with your real GCP project ID.Schedule trigger (for example 0 9 * * *) to capture the top pages every morning.IonToCsv with IonToJson or IonToParquet for downstream tools that prefer JSON or columnar formats.io.kestra.plugin.gcp.gcs.Upload for long-term archival.outputFiles.io.kestra.plugin.notifications.slack.SlackIncomingWebhook for a morning digest.