Airflow on Windows: Quick and Easy Installation Guide and First Dag creation in less than 10 minute
Описание
Steps for installation :
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-pip
pip install apache-airflow
airflow db init
airflow users create --role Admin --username admin --email admin --firstname admin --lastname admin --password admin
airflow scheduler
airflow webserver -p 8080
Dag Code :
from datetime import datetime
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
def print_hello():
return 'Hello world from first Airflow DAG!'
dag = DAG('hello_world', description='Hello World DAG',
schedule_interval='0 12 * * *',
start_date=datetime(2017, 3, 20), catchup=False)
hello_operator = PythonOperator(task_id='hello_task', python_callable=print_hello, dag=dag)
hello_operator
Рекомендуемые видео



















