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: - clones a dbt Git repository from GitHub, - pulls a public container image with the required dependencies - runs dbt CLI commands in a Docker container. 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