Ctrl + K
DocumentationLog inGet started

tessl/pypi-apache-airflow-providers-ftp

tessl install tessl/pypi-apache-airflow-providers-ftp@3.13.0

Provider 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%

task.mdevals/scenario-5/

FTP Data Processor

Build a Python module that downloads a CSV file from an FTP server, processes it in-memory, and uploads the processed result back to the server without writing to disk.

Requirements

Your module should provide a function that:

  1. Downloads a CSV file from a remote FTP server directly into memory (no disk I/O)
  2. Processes the CSV data by:
    • Converting all text values to uppercase
    • Filtering out rows where the first column is empty
  3. Uploads the processed CSV back to the FTP server directly from memory (no disk I/O)
  4. Returns the number of rows processed (excluding header)

The function should accept:

  • FTP connection details (host, username, password)
  • Remote file path for the source CSV
  • Remote file path for the destination CSV

Implementation { .implementation }

@generates

API { #api }

def process_ftp_csv(
    ftp_host: str,
    ftp_user: str,
    ftp_password: str,
    source_path: str,
    dest_path: str
) -> int:
    """
    Download CSV from FTP, process in-memory, and upload result.

    Args:
        ftp_host: FTP server hostname
        ftp_user: FTP username
        ftp_password: FTP password
        source_path: Remote path to source CSV file
        dest_path: Remote path to destination CSV file

    Returns:
        Number of data rows processed (excluding header)
    """
    pass

Test Cases

  • Given a CSV with 3 data rows (plus header) containing mixed case text and no empty first columns, the function processes all 3 rows and returns 3 @test
  • Given a CSV with 5 data rows where 2 rows have empty first columns, the function processes only 3 rows and returns 3 @test
  • The processed CSV uploaded to the FTP server has all text values in uppercase @test

Dependencies { .dependencies }

apache-airflow-providers-ftp { .dependency }

Provides FTP operations support for file transfer and server interaction.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/apache-airflow-providers-ftp@3.13.x
tile.json