Skip to content

Instantly share code, notes, and snippets.

Created August 9, 2018 10:18
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Hello World DAG
from datetime import datetime
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
from airflow.operators import MultiplyBy5Operator
def print_hello():
return 'Hello Wolrd'
dag = DAG('hello_world', description='Hello world example', schedule_interval='0 12 * * *', start_date=datetime(2017, 3, 20), catchup=False)
dummy_operator = DummyOperator(task_id='dummy_task', retries = 3, dag=dag)
hello_operator = PythonOperator(task_id='hello_task', python_callable=print_hello, dag=dag)
multiplyby5_operator = MultiplyBy5Operator(my_operator_param='my_operator_param',
task_id='multiplyby5_task', dag=dag)
dummy_operator >> hello_operator
dummy_operator >> multiplyby5_operator
Copy link

ImportError: cannot import name 'MultiplyBy5Operator' from 'airflow.operators'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment