You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/example_dags.rst
+25-26Lines changed: 25 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Example DAGs
4
4
This section contains a few DAGs showing off some dbt pipelines to get you going.
5
5
6
6
.. warning::
7
-
All example DAGs are tested against against `apache-airflow==2.2.5`. Some changes, like modifying `import` statements or changing types, may be required for them to work in environments running other versions of Airflow.
7
+
All example DAGs are tested against against ``apache-airflow==2.2.5``. Some changes, like modifying ``import`` statements or changing types, may be required for them to work in environments running other versions of Airflow.
8
8
9
9
Basic DAG
10
10
^^^^^^^^^
@@ -15,31 +15,30 @@ This basic DAG shows off a single ``DbtRunOperator`` that executes daily:
15
15
:linenos:
16
16
:caption: basic_dag.py
17
17
18
-
"""Sample basic DAG which dbt runs a project."""
19
-
import datetime as dt
20
-
21
-
from airflow importDAG
22
-
from airflow.utils.dates import days_ago
23
-
from airflow_dbt_python.operators.dbt import DbtRunOperator
24
-
25
-
with DAG(
26
-
dag_id="example_basic_dbt_run",
27
-
schedule_interval="0 * * * *",
28
-
start_date=days_ago(1),
29
-
catchup=False,
30
-
dagrun_timeout=dt.timedelta(minutes=60),
31
-
) as dag:
32
-
33
-
dbt_run = DbtRunOperator(
34
-
task_id="dbt_run_hourly",
35
-
project_dir="/path/to/my/dbt/project/",
36
-
profiles_dir="~/.dbt/",
37
-
select=["+tag:hourly"],
38
-
exclude=["tag:deprecated"],
39
-
target="production",
40
-
profile="my-project",
41
-
full_refresh=False,
42
-
)
18
+
"""Sample basic DAG which dbt runs a project."""
19
+
import datetime as dt
20
+
21
+
from airflow importDAG
22
+
from airflow.utils.dates import days_ago
23
+
from airflow_dbt_python.operators.dbt import DbtRunOperator
0 commit comments