New to Kestra?
Use blueprints to kickstart your first workflows.
Clone Python ETL scripts from Git, extract REST API data in Docker, and load it into Postgres with Kestra orchestration, secrets, and retries.
Build a version-controlled API-to-Postgres pipeline that keeps your orchestration in YAML and your business logic in Python. This blueprint clones a Git repository of ETL scripts, runs them in isolated Docker containers to fetch data from a REST API, and loads the results into a Postgres database. It solves the common problem of tangled glue code by separating what runs (the workflow) from how it runs (the Python), so data engineers can ship API ingestion and database loads without rebuilding the scheduler each time requirements change.
io.kestra.plugin.core.flow.WorkingDirectory task named wdir wraps the steps so they share one filesystem, letting cloned scripts and generated files pass between tasks.io.kestra.plugin.git.Clone (clone_repository) pulls the main branch of https://github.com/kestra-io/scripts into the working directory.io.kestra.plugin.scripts.python.Commands (get_users) runs python etl/get_users_from_api.py on the io.kestra.plugin.scripts.runner.docker.Docker runner with the requests dependency, extracting API data into a users.json file.io.kestra.plugin.scripts.python.Commands task (save_users_pg) runs python etl/save_users_pg.py with pandas, psycopg2, and sqlalchemy, reading the raw file and loading it into Postgres. Connection settings are injected as env vars (DB_USERNAME, DB_PASSWORD, DB_HOST, DB_PORT).users.json between extract and load via the shared working directory.Cron or a bare Python runner cannot give you the full picture: declarative YAML keeps the pipeline reviewable in pull requests, event and schedule triggers can launch it on demand or on a cadence, automatic retries recover from flaky API calls or transient database errors, and execution history records lineage across the clone, extract, and load steps. The Git clone and per-task Docker runners deliver dependency isolation and reproducibility that a single Postgres job scheduler simply was not built to coordinate.
host.docker.internal:5432).kestra-io/scripts GitHub repository.DB_PASSWORD: the Postgres password injected into the load task as the DB_PASSWORD environment variable.DB_PASSWORD secret in your Kestra instance.DB_HOST and DB_PORT.company.team namespace.clone_repository at your own repository and branch to run your team's ETL scripts.