tessl install tessl/pypi-apache-airflow-providers-ftp@3.13.0Provider package for Apache Airflow that enables FTP file transfer protocol operations including hooks, operators, and sensors for workflow integration.
Agent Success
Agent success rate when using this tile
84%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.06x
Baseline
Agent success rate without this tile
79%
Build a file monitoring system for an Airflow DAG that watches for data files from international partners who use FTP servers with non-UTF-8 character encodings. The system must handle Cyrillic filenames (Windows-1251 encoding) from Eastern European partners and Latin-1 filenames (ISO-8859-1 encoding) from Western European partners.
Your task is to implement an Airflow DAG that monitors two different FTP servers with different character encodings:
отчет_данные.csv (translates to "report_data.csv") on an FTP server using Windows-1251 (cp1251) encodingdonnées_françaises.csv (French for "french_data.csv") on an FTP server using ISO-8859-1 encodingBoth sensors should:
eastern_ftp and western_ftp for the respective serversThe monitoring tasks should run in parallel (no dependencies between them).
@generates
eastern_ftp configured with encoding cp1251 in extras, the sensor successfully detects the Cyrillic filename отчет_данные.csv when it exists on the FTP server @testwestern_ftp configured with encoding iso-8859-1 in extras, the sensor successfully detects the Latin-1 filename données_françaises.csv when it exists on the FTP server @testfrom airflow import DAG
from datetime import datetime, timedelta
# Create the DAG named 'international_file_monitor'
# with a start_date of datetime(2024, 1, 1)
# and default_args including retries=1
dag = DAG(
'international_file_monitor',
start_date=datetime(2024, 1, 1),
default_args={'retries': 1},
schedule_interval=None,
)
# Define two sensor tasks for monitoring:
# 1. monitor_eastern_file - monitors 'отчет_данные.csv' using 'eastern_ftp' connection
# 2. monitor_western_file - monitors 'données_françaises.csv' using 'western_ftp' connectionProvides FTP operations and sensors for Apache Airflow with support for custom character encodings.