-
Notifications
You must be signed in to change notification settings - Fork 0
/
0ea903d23769_dag.py
40 lines (30 loc) · 914 Bytes
/
0ea903d23769_dag.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from airflow import DAG
from airflow.providers.databricks.operators.databricks import DatabricksSubmitRunOperator, DatabricksRunNowOperator
from datetime import datetime, timedelta
notebook_task = {
'notebook_path': '/Users/arekzajac@outlook.com/0ea903d23769',
}
notebook_params = {
"Variable":5
}
default_args = {
'owner': 'ArekZajac',
'depends_on_past': False,
'email_on_failure': False,
'email_on_retry': False,
'retries': 0,
'retry_delay': timedelta(minutes=2)
}
with DAG('0ea903d23769_dag',
start_date=datetime(2023, 11, 27),
schedule_interval='@daily',
catchup=False,
default_args=default_args
) as dag:
opr_submit_run = DatabricksSubmitRunOperator(
task_id='submit_run',
databricks_conn_id='databricks_default',
existing_cluster_id='1108-162752-8okw8dgg',
notebook_task=notebook_task
)
opr_submit_run