Last active
August 23, 2022 10:15
-
-
Save cra/855b6e59f769f3d93712acd36c45c126 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow.models import DAG | |
from airflow.utils.dates import days_ago | |
from airflow.operators.python import PythonOperator | |
from airflow.operators.empty import EmptyOperator | |
def ohai(raz, dva, tri, chetyre): | |
print("Оппа нихуя себе", raz, dva) | |
print("И так тоже можно:", tri, chetyre) | |
with DAG( | |
dag_id="yoba", | |
schedule_interval=None, | |
start_date=days_ago(3), | |
catchup=False, | |
) as dag: | |
start = EmptyOperator(task_id='start') | |
op1 = PythonOperator( | |
task_id='bzzz', | |
python_callable=ohai, | |
op_args=('раз-раз-раз', 'это хардбас'), | |
op_kwargs={ | |
'tri': 'все в спортивках', | |
'chetyre': 'адидас', | |
}, | |
) | |
end = EmptyOperator(task_id='end') | |
start >> op1 >> end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment