Skip to content

Commit

Permalink
fix: dbt loadManifest example - closes #156
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-geller committed Oct 29, 2024
1 parent b7393b8 commit 4508e5c
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/main/java/io/kestra/plugin/dbt/cli/DbtCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,28 @@
target: dev"""
),
@Example(
title = "Clone a [Git repository](https://github.com/kestra-io/dbt-example) and build dbt models in defer mode. The `loadManifest` property will fetch an existing `manifest.json` and use it to run a subset of models or tests along with the `--defer` flag.",
title = "Clone a [Git repository](https://github.com/kestra-io/dbt-example) and build dbt models using the `--defer` flag. The `loadManifest` property will fetch an existing `manifest.json` and use it to run a subset of models that have changed since the last run.",
full = true,
code = """
id: dbt_duckdb
id: dbt_defer
namespace: company.team
inputs:
- id: dbt_command
type: SELECT
allowCustomValue: true
defaults: dbt build --project-dir dbt --target prod --no-partial-parse
values:
- dbt build --project-dir dbt --target prod --no-partial-parse
- dbt build --project-dir dbt --target prod --no-partial-parse --select state:modified+ --defer --state ./target
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: main
branch: master
- id: dbt_build
type: io.kestra.plugin.dbt.cli.DbtCLI
Expand All @@ -203,9 +212,9 @@
storeManifest:
key: manifest.json
namespace: "{{ flow.namespace }}"
projectDir: dbt
commands:
- dbt build --defer --state ./target --target prod
- "{{ inputs.dbt_command }}"
profiles: |
my_dbt_project:
outputs:
Expand Down

0 comments on commit 4508e5c

Please sign in to comment.