Confusing usage of AthenaSensor? #24984
Replies: 4 comments 1 reply
-
It's not confusing at all. What actually is confusing is to see you use Sequential Executor.
Could you please explaine @saswatarautray what made you use Sequential Executor despite warning in the documentation and big fat warnings that you see when you run airlfow webserver. I am sincerely confused. Could you please explain what made you make such an odd choice? |
Beta Was this translation helpful? Give feedback.
-
First of all, you shouldn't use I guess the reason that you might consider using Also, don't forget that sensors could be also independent.. Another DAG's Finally, it's hard to say why these blogs mention this task's skeleton without seeing the actual blog posts.. But maybe the intention was purely educational, to show you many ways that you can use Athena from Airflow. |
Beta Was this translation helpful? Give feedback.
-
I don't understand this. Are you saying that Task1 can complete with success and the task is not complete? I have been experimenting with the Athena Operator and it seems that when the AthenaOperator completes that the data that was produced by that task is available and the next operator can just wait on the athenOperator without having to add in a sensor there. I totally get the use of the sensor when you are waiting on an operator from a different pipeline/flow, but within the same flow it seems all I need to do is make each take depend on the last and it works... What am I missing? |
Beta Was this translation helpful? Give feedback.
-
Per the current implementation, airflow/providers/amazon/src/airflow/providers/amazon/aws/operators/athena.py Lines 165 to 175 in 5d87bdd |
Beta Was this translation helpful? Give feedback.
-
As per the various blogs on AthenaSensor, the usage looks like:
However, in case of sequential executor, only 1 task can run at a time. We can specify the order of execution of tasks using Bitwise (<</>>) operators, which means task3 cannot run before task1 completes.
So, is the need for AthenaSensor redundant? What's its use?
Beta Was this translation helpful? Give feedback.
All reactions