Blueprints

Git workflow for dbt with MotherDuck

About this blueprint

DuckDB Git dbt

This flow:

To use MotherDuck, use Kestra Secret to store the MotherDuck service token.

yaml
id: dbt_motherduck
namespace: company.team

tasks:
  - id: git
    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
        profiles: |
          my_dbt_project:
            outputs:
              dev:
                type: duckdb
                disable_transactions: true
                path: md:my_dbt_project?motherduck_token={{secret('MOTHERDUCK_TOKEN')}}
                fixed_retries: 1
                threads: 16
                timeout_seconds: 300
            target: dev
        commands:
          - dbt deps
          - dbt build

Working Directory

Clone

Dbt CLI

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra