Blueprints

Git workflow for dbt with DuckDB

About this blueprint

Git dbt DuckDB

To run dbt with DuckDB, this flow does the following:

  1. Clones a dbt Git repository from GitHub,
  2. Pulls a public container image with the latest package dependencies
  3. Runs dbt CLI commands in a Docker container.
yaml
id: dbt-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-example
        branch: main
      - id: dbt_build
        type: io.kestra.plugin.dbt.cli.DbtCLI
        taskRunner:
          type: io.kestra.plugin.scripts.runner.docker.Docker
        containerImage: ghcr.io/kestra-io/dbt-duckdb:latest
        commands:
          - dbt deps
          - dbt build
        profiles: |
          my_dbt_project:
            outputs:
              dev:
                type: duckdb
                path: ":memory:"
                fixed_retries: 1
                threads: 16
                timeout_seconds: 300
            target: dev

Working Directory

Clone

Dbt CLI

Docker

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra