New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate dbt Core transformations on Google BigQuery from a Git repository with Kestra, running dbt deps and dbt build in a container for reproducible ELT.
Run dbt Core transformations on Google BigQuery straight from a Git repository, turning version-controlled SQL models into analytics-ready tables and views. This blueprint solves a common analytics engineering problem: keeping dbt projects Git-managed and reproducible while running them on a real warehouse with proper authentication, logging, and dependency resolution, instead of relying on a developer laptop or an ad hoc cron job.
The flow uses a single io.kestra.plugin.core.flow.WorkingDirectory task named git to keep cloning and execution in one shared directory:
clone_repository (io.kestra.plugin.git.Clone) clones the kestra-io/dbt-example repository from the main branch into the working directory.dbt (io.kestra.plugin.dbt.cli.DbtCLI) runs the project in a container using the io.kestra.plugin.scripts.runner.docker.Docker task runner with the ghcr.io/kestra-io/dbt-bigquery:latest image, so the BigQuery adapter and dependencies are preinstalled.sa.json via inputFiles from the GCP_CREDS secret, and the inline profiles block points dbt at BigQuery using the service-account method, with location: EU, threads: 16, and a dev target.dbt deps followed by dbt build, resolving packages and then running and testing models in one pass.dbt deps and dbt build invocation.dbt's own CLI can run models but cannot schedule, retry, or connect them to upstream events on its own. With Kestra you can attach event or schedule triggers, add automatic retries on transient BigQuery failures, capture per-task logs and lineage, and define the whole pipeline as declarative YAML kept under version control. This closes the gap dbt Core leaves open: turning a manual command into a governed, observable, production workflow.
GCP_CREDS: the full Google Cloud service account JSON key, injected as sa.json for dbt's BigQuery profile.GCP_CREDS secret with your service account JSON.profiles block with your BigQuery dataset, project, and location.clone_repository at your own dbt project repository and branch.dbt task logs to confirm the build.io.kestra.plugin.core.trigger.Schedule trigger to run transformations on a cadence.dbt build for dbt run, dbt test, or selectors like dbt build --select tag:daily.