Bulk Load CSV Data into PostgreSQL Using COPY for Fast ETL Ingestion
Bulk load a CSV file into PostgreSQL with the native COPY protocol for fast, reliable ETL ingestion.
Fetch the most starred repositories of a GitHub user or organization, save the stats as CSV and summarize them per language with DuckDB.
Track the popularity of any GitHub user or organization without a token, account or secret. This blueprint calls the public GitHub Search API for the most starred repositories of an owner, saves stars, forks and open issues into a CSV file and sums them per programming language with an in-memory DuckDB query.
weekly_schedule trigger (io.kestra.plugin.core.trigger.Schedule) runs the flow every Monday at 08:00 UTC.fetch_repositories (io.kestra.plugin.core.http.Request) calls the GitHub Search API for the owner and top inputs, with exponential retries.check_repositories_found (io.kestra.plugin.core.flow.If) continues only when the owner exists and has public repositories. Otherwise log_no_repositories logs a warning.save_csv (io.kestra.plugin.core.storage.Write) stores one row per repository as a CSV file in internal storage.summarize_languages (io.kestra.plugin.jdbc.duckdb.Query) reads the CSV in memory and sums stars, forks and open issues per language.log_report (io.kestra.plugin.core.log.Log) writes the ranking and the language summary into the execution log.save_csv task outputs.A script with curl has no retries, no run history and no place to keep the CSV. Kestra gives the pipeline scheduling, retries, conditional branching, file outputs and a full execution history in one declarative flow.
summarize_languages task needs the DuckDB plugin (io.kestra.plugin.jdbc.duckdb), which is included in the Kestra full image.owner (STRING, default kestra-io): GitHub user or organization name.top (INT, default 10): number of most starred repositories, from 1 to 100.save_csv: CSV file with the statistics, available as {{ outputs.save_csv.uri }} in the task outputs.owner to the user or organization you want to follow.save_csv task outputs.weekly_schedule trigger enabled, or set disabled: true to run the flow manually only.Authorization header with a GitHub token secret to raise the API rate limit.