Skip to content

Commit

Permalink
docs: Minor doc updates to mention support for dbt docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Dec 26, 2021
1 parent 267279e commit 1cffdca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -96,6 +96,7 @@ Currently, the following `dbt` commands are supported:
* `compile`
* `debug`
* `deps`
* `docs generate`
* `ls`
* `parse`
* `run`
Expand Down
13 changes: 12 additions & 1 deletion examples/dbt_project_in_s3_dag.py
Expand Up @@ -3,7 +3,7 @@

from airflow import DAG
from airflow.utils.dates import days_ago
from airflow_dbt_python.dbt.operators import DbtRunOperator
from airflow_dbt_python.dbt.operators import DbtDocsGenerateOperator, DbtRunOperator

with DAG(
dag_id="example_basic_dbt_run_with_s3",
Expand All @@ -12,6 +12,7 @@
catchup=False,
dagrun_timeout=dt.timedelta(minutes=60),
) as dag:
# Project files will be pulled from "s3://my-bucket/dbt/profiles/key/prefix/"
dbt_run = DbtRunOperator(
task_id="dbt_run_hourly",
project_dir="s3://my-bucket/dbt/project/key/prefix/",
Expand All @@ -22,3 +23,13 @@
profile="my-project",
full_refresh=False,
)

# Documentation files (target/manifest.json, target/index.html, and
# target/catalog.json) will be pushed back to S3 after compilation is done.
dbt_docs = DbtDocsGenerateOperator(
task_id="dbt_run_hourly",
project_dir="s3://my-bucket/dbt/project/key/prefix/",
profiles_dir="s3://my-bucket/dbt/profiles/key/prefix/",
)

dbt_run >> dbt_docs

0 comments on commit 1cffdca

Please sign in to comment.