Skip to content

Use the projectDir directly in the dbt commands #182

@Ben8t

Description

@Ben8t

Feature description

Currently users have to set projectDir in the flow property AND --project-dir in the dbt commands

Setting projecDir in the flow should add the --project-dir flag to the command directly.

https://kestra.io/plugins/plugin-dbt/dbt-cli/io.kestra.plugin.dbt.cli.dbtcli

id: dwh_and_analytics
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: master
    - 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 build --project-dir dbt --target prod
      projectDir: dbt
      profiles: |
        my_dbt_project:
          outputs:
            dev:
              type: duckdb
              path: dbt.duckdb
              extensions:
                - parquet
              fixed_retries: 1
              threads: 16
              timeout_seconds: 300
            prod:
              type: duckdb
              path: dbt2.duckdb
              extensions: 
                - parquet
              fixed_retries: 1
              threads: 16
              timeout_seconds: 300
          target: dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/pluginPlugin-related issue or feature requestenhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions