CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-connectorx

Load data from databases to dataframes, the fastest way.

86

1.04x

Quality

Pending

Does it follow best practices?

Impact

86%

1.04x

Average score across 10 eval scenarios

Overview
Eval results
Files

task.mdevals/scenario-10/

Sales Data Aggregator

A data processing tool that efficiently loads large sales datasets from a PostgreSQL database using parallel processing techniques.

Capabilities

Parallel Data Loading

Load sales transaction data from a PostgreSQL database using parallel partitioning to maximize performance.

  • Given a connection string postgresql://user:pass@localhost:5432/salesdb and query SELECT * FROM sales WHERE year = 2024, load data using 4 parallel partitions on the id column and return a pandas DataFrame @test
  • Given the same query with 8 partitions instead of 4, the function should still return all data correctly in a pandas DataFrame @test
  • When the partition column contains values from 1 to 1000, partitioning into 4 partitions should divide the range approximately evenly @test

Implementation

@generates

API

def load_sales_data(
    connection_string: str,
    query: str,
    partition_column: str,
    num_partitions: int
) -> pandas.DataFrame:
    """
    Load sales data from database using parallel partitioning.

    Args:
        connection_string: Database connection string (e.g., "postgresql://user:pass@host/db")
        query: SQL query to execute
        partition_column: Column to use for partitioning (must be numeric)
        num_partitions: Number of parallel partitions to create

    Returns:
        DataFrame containing all loaded data
    """
    pass

Dependencies { .dependencies }

connectorx { .dependency }

Provides high-performance database-to-dataframe loading with parallel query partitioning support.

@satisfied-by

pandas { .dependency }

Provides DataFrame data structure for storing and manipulating loaded data.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/pypi-connectorx

tile.json