Source
yaml
id: dbt-git-docker-duckdb
namespace: company.team
tasks:
- id: dbt
type: io.kestra.plugin.core.flow.WorkingDirectory
tasks:
- id: clone_repository
type: io.kestra.plugin.git.Clone
url: https://github.com/kestra-io/dbt-demo
branch: main
- id: dbt_core
type: io.kestra.plugin.dbt.cli.DbtCLI
taskRunner:
type: io.kestra.plugin.scripts.runner.docker.Docker
containerImage: ghcr.io/kestra-io/dbt-duckdb:latest
inputFiles:
packages.yml: |
packages:
- package: brooklyn-data/dbt_artifacts
version: 2.8.0
profiles: |
jaffle_shop:
outputs:
dev:
type: duckdb
path: ":memory:"
extensions:
- parquet
fixed_retries: 1
threads: 16
timeout_seconds: 300
target: dev
commands:
- dbt deps
- dbt build
About this blueprint
CLI Git dbt DuckDB
This flow runs multiple dbt commands in a single container. This approach can be useful if you want to run several dbt commands and you want to run them all in one container to minimize latency. Firstly, the flow creates the working directory. Within the working directory, the flow contains tasks to 1. clone the git repository 2. run the dbt commands in a docker container