Provider package for Apache Airflow that enables FTP file transfer protocol operations including hooks, operators, and sensors for workflow integration.
84
A utility for downloading daily sales reports from a remote FTP server to the local filesystem for further processing.
@generates
def download_report(ftp_conn_id: str, remote_filepath: str, local_filepath: str) -> str:
"""
Downloads a single report file from an FTP server to the local filesystem.
Args:
ftp_conn_id: Airflow connection ID for the FTP server
remote_filepath: Path to the file on the remote FTP server
local_filepath: Path where the file should be saved locally
Returns:
The local file path where the report was saved
Raises:
Exception: If the remote file does not exist or download fails
"""
pass
def download_reports_batch(ftp_conn_id: str, remote_filepaths: list, local_filepaths: list) -> list:
"""
Downloads multiple report files from an FTP server in a single operation.
Args:
ftp_conn_id: Airflow connection ID for the FTP server
remote_filepaths: List of paths to files on the remote FTP server
local_filepaths: List of paths where files should be saved locally
Returns:
List of local file paths where the reports were saved
Raises:
ValueError: If the lengths of remote_filepaths and local_filepaths don't match
Exception: If any file download fails
"""
pass
def download_report_with_dirs(ftp_conn_id: str, remote_filepath: str, local_filepath: str) -> str:
"""
Downloads a report file from an FTP server, automatically creating any
necessary parent directories in the local filesystem.
Args:
ftp_conn_id: Airflow connection ID for the FTP server
remote_filepath: Path to the file on the remote FTP server
local_filepath: Path where the file should be saved locally (may be nested)
Returns:
The local file path where the report was saved
"""
passProvides FTP file transfer operations for Apache Airflow, including hooks and operators for downloading files from FTP servers.
Install with Tessl CLI
npx tessl i tessl/pypi-apache-airflow-providers-ftpevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10