Skip to content

Commit 1cffdca

Browse files
committed
docs: Minor doc updates to mention support for dbt docs
1 parent 267279e commit 1cffdca

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Currently, the following `dbt` commands are supported:
9696
* `compile`
9797
* `debug`
9898
* `deps`
99+
* `docs generate`
99100
* `ls`
100101
* `parse`
101102
* `run`

examples/dbt_project_in_s3_dag.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from airflow import DAG
55
from airflow.utils.dates import days_ago
6-
from airflow_dbt_python.dbt.operators import DbtRunOperator
6+
from airflow_dbt_python.dbt.operators import DbtDocsGenerateOperator, DbtRunOperator
77

88
with DAG(
99
dag_id="example_basic_dbt_run_with_s3",
@@ -12,6 +12,7 @@
1212
catchup=False,
1313
dagrun_timeout=dt.timedelta(minutes=60),
1414
) as dag:
15+
# Project files will be pulled from "s3://my-bucket/dbt/profiles/key/prefix/"
1516
dbt_run = DbtRunOperator(
1617
task_id="dbt_run_hourly",
1718
project_dir="s3://my-bucket/dbt/project/key/prefix/",
@@ -22,3 +23,13 @@
2223
profile="my-project",
2324
full_refresh=False,
2425
)
26+
27+
# Documentation files (target/manifest.json, target/index.html, and
28+
# target/catalog.json) will be pushed back to S3 after compilation is done.
29+
dbt_docs = DbtDocsGenerateOperator(
30+
task_id="dbt_run_hourly",
31+
project_dir="s3://my-bucket/dbt/project/key/prefix/",
32+
profiles_dir="s3://my-bucket/dbt/profiles/key/prefix/",
33+
)
34+
35+
dbt_run >> dbt_docs

0 commit comments

Comments
 (0)