Blueprints

Git workflow for dbt with MotherDuck

Source

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

About this blueprint

Git dbt DuckDB

This flow:

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

Working Directory

Clone

Dbt CLI

Docker

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra