Skip to content

Tag: airflow

How to return False when file exists with FIleSensor

I’m trying to reverse FileSensor(): that is, with It will return True if the file exists. But, how can it return False when the file exists and True when it does not? Answer You could create a PythonSensor that checks for the existence of a file with the logic that you want.