Skip to content

Commit

Permalink
dag example
Browse files Browse the repository at this point in the history
  • Loading branch information
cherkavi authored Jul 28, 2021
1 parent 0902574 commit 517e51f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions airflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,37 @@ with DAG('airflow_tutorial_v01',
# next string will not work !!! only for Task/Operators values !!!!
print("{{ dag_run.conf.get('sku', 'default_value_for_sku') }}" )
```

```python
DEFAULT_ARGS = {
'owner': 'airflow',
'depends_on_past': True,
'start_date': datetime(2015, 12, 1),
'email_on_failure': False,
'email_on_retry': False,
# 'retries': 3,
# 'retry_delay': timedelta(seconds=30),
}

with DAG(DAG_NAME,
start_date=datetime(2015, 12, 1),
catchup=False,
schedule_interval=None
catchup=True,
schedule_interval=None,
max_active_runs=1,
concurrency=1,
default_args=DEFAULT_ARGS
) as dag:
PythonOperator(task_id="image_set_variant",
python_callable=image_set_variant,
provide_context=True,
retries=3,
retry_delay=timedelta(seconds=30),
# retries=3,
# retry_delay=timedelta(seconds=30),
doc_md="""
```
* simple DAG
```python
Expand Down

0 comments on commit 517e51f

Please sign in to comment.