geraj1010 commented on issue #41472:
URL: https://github.com/apache/airflow/issues/41472#issuecomment-2300595119

   > > Is there an issue with using an `SFTPSensor` for checking file 
existence, prior to running `SFTPToGCSOperator`?
   > 
   > The SFTP sensor will wait until the file is detected. This issue is to 
determine whether the task should fail if the file is not found.
   
   I see. In that case, I don't think it makes sense to have the task succeed 
if a file is not found. A 'success' would not have much meaning anymore besides 
that the task simply ran. The interpretation of 'success' would become 
ambiguous i.e. how can you tell if a file was indeed moved or not without 
having to further dig into the logs? In addition, it doesn't feel very 
'airflow-like' since we would be overloading the operator with functionality 
that already exists through a sensor.
   
   I'm not sure what your DAG looks like, but perhaps you can use a 
`SFTPSensor` and trigger rules for your downstream tasks? There is `soft_fail` 
for sensors too, if you want the sensor to 'skip' instead of 'fail'.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to