Complete the code to import the FileSensor class from Airflow sensors.
from airflow.sensors.filesystem import [1]
The FileSensor class is imported from airflow.sensors.filesystem to detect file arrival.
Complete the code to create a FileSensor that checks for a file named 'data.csv' in '/tmp'.
file_sensor = FileSensor(task_id='check_file', filepath='/tmp/[1]')
The filepath parameter should point to the file to detect, here 'data.csv'.
Fix the error in the FileSensor initialization by completing the missing parameter for poke interval in seconds.
file_sensor = FileSensor(task_id='check_file', filepath='/tmp/data.csv', poke_interval=[1])
The poke_interval must be an integer number of seconds, like 5.
Fill both blanks to create a FileSensor that waits for 'report.txt' in '/data' and times out after 60 seconds.
file_sensor = FileSensor(task_id='wait_report', filepath='/data/[1]', timeout=[2])
The filepath should be 'report.txt' and timeout set to 60 seconds.
Fill all three blanks to create a FileSensor that waits for 'config.json' in '/configs', checks every 10 seconds, and times out after 120 seconds.
file_sensor = FileSensor(task_id='wait_config', filepath='/configs/[1]', poke_interval=[2], timeout=[3])
The filepath is 'config.json', poke_interval is 10 seconds, and timeout is 120 seconds.