I'm new to Airflow.
I have a DAG which contains a task that should run on a specific machine (EMR cluster in my case). How can I tell airflow where to run specific tasks so that every time it will run it will do so on that machine only?
Run your worker on that machine with a queue name. In the airflow cli you could do something like:
airflow worker -q my_queue
Then define that task to use that queue:
task = PythonOperator(
task_id='task',
python_callable=my_callable,
queue='my_queue',
dag=dag)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With