Ctrl + k

or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/connectorx@0.4.x
tile.json

tessl/pypi-connectorx

tessl install tessl/pypi-connectorx@0.4.0

Load data from databases to dataframes, the fastest way.

Agent Success

Agent success rate when using this tile

86%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.05x

Baseline

Agent success rate without this tile

82%

task.mdevals/scenario-5/

Database Schema Inspector

A utility tool that retrieves and validates database schema information without loading actual data.

Capabilities

Schema Retrieval

Retrieve column names and data types from a database query without fetching the actual data rows.

  • Given connection string "sqlite:///:memory:" and query "SELECT 1 as id, 'test' as name", return {"id": "Int64", "name": "object"} @test
  • Given connection string "sqlite:///:memory:" and query selecting from a table with columns (id INTEGER, price REAL, description TEXT), return correct schema with three entries @test

Schema Comparison

Compare schemas from two queries to identify structural differences.

  • Given two queries with columns (id, name) and (id, email) respectively, return comparison showing "id" as common and "name", "email" as unique @test

Error Handling

Handle invalid queries appropriately when retrieving schema.

  • Given query "SELECT * FROM nonexistent_table", raise an exception @test

Implementation

@generates

API

def get_schema(connection_string: str, query: str) -> dict[str, str]:
    """
    Retrieve the schema (column names and types) from a database query.

    Args:
        connection_string: Database connection string
        query: SQL query to inspect

    Returns:
        Dictionary mapping column names to their data type names

    Raises:
        Exception: If the connection fails or query is invalid
    """
    pass

def compare_schemas(connection_string: str, query1: str, query2: str) -> dict[str, list[str]]:
    """
    Compare schemas from two queries.

    Args:
        connection_string: Database connection string
        query1: First SQL query
        query2: Second SQL query

    Returns:
        Dictionary with keys:
        - 'common': List of column names present in both queries
        - 'only_query1': List of column names only in query1
        - 'only_query2': List of column names only in query2
    """
    pass

Dependencies { .dependencies }

connectorx { .dependency }

Provides high-performance database connectivity and metadata retrieval capabilities.

@satisfied-by