Skip to content

dbt (dbt@v1)

Run dbt Core commands from a Dagu workflow.

  • Repository: dagucloud/dbt
  • Runtime owned by the action: astral-sh/uv@0.11.14 through action tools; default Python 3.13.9

Contributions are welcome. The repository is public, so improvements, bug reports, and pull requests can go to dagucloud/dbt.

Example

yaml
steps:
  - id: dbt_build
    action: dbt@v1
    with:
      projectDir: /data/jaffle-shop
      profilesDir: /data/dbt-profiles
      requirements:
        - dbt-duckdb==1.10.1
      command: build
      targetPath: ${DAG_RUN_ARTIFACTS_DIR}/dbt-target
      logPath: ${DAG_RUN_ARTIFACTS_DIR}/dbt-logs

  - id: print_summary
    run: |
      echo "dbt exit code: ${dbt_build.outputs.exitCode}"
      echo "dbt run results: ${dbt_build.outputs.runResultsPath}"
    depends: dbt_build

projectDir must point to the directory containing dbt_project.yml on the worker that runs the action. Packaged actions run in their own action workspace, so use absolute paths or paths that are meaningful on that worker.

Use requirements for pip-compatible dbt packages. The default is dbt-core, but most projects should pin an adapter package such as dbt-duckdb==1.10.1, dbt-postgres==1.9.0, or the adapter version used by your project.

Supported commands include build, run, test, seed, snapshot, compile, deps, debug, parse, list, ls, show, run-operation, source freshness, docs generate, and clean. Use args for command-specific flags that do not have a first-class input.

Inputs

FieldDescription
projectDirRequired directory containing dbt_project.yml.
commanddbt command to run. Defaults to build.
requirementsPip requirement specifiers installed with uv run --with. Defaults to ["dbt-core"].
profilesDirOptional directory containing profiles.yml.
profile / targetOptional dbt profile and target names.
select / excludeRepeated dbt selection and exclusion arguments.
selectorYAML selector name passed with --selector.
varsValue passed with --vars; objects are encoded as compact JSON.
threadsThread count passed with --threads.
stateState directory passed with --state.
targetPath / logPathDirectories passed with --target-path and --log-path.
fullRefresh, failFast, warnError, defer, quietBoolean dbt flags.
argsAdditional raw dbt CLI arguments appended after structured options.
envExtra environment variables exposed to the dbt process.
pythonVersionPython version used by uv. Defaults to 3.13.9.
timeoutSecondsTimeout for the dbt process. Defaults to 3600.

Outputs

FieldDescription
oktrue when dbt exits with code 0.
exitCodedbt process exit code.
commandFull argv used to invoke dbt through uv.
stdout / stderrCaptured dbt stdout and stderr.
durationMsWrapper-measured dbt process duration in milliseconds.
targetPath / logPathEffective dbt target and log paths.
manifestPathPresent when manifest.json exists under targetPath.
runResultsPathPresent when run_results.json exists under targetPath.
catalogPathPresent when catalog.json exists under targetPath.
sourcesPathPresent when sources.json exists under targetPath.
errorValidation or wrapper error object when dbt does not start.

Released under the MIT License.