tessl install tessl/pypi-connectorx@0.4.0Load 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%
Build a Python module that processes large database query results in batches to compute aggregate statistics without loading all data into memory at once.
Create a function process_large_query that takes a database connection string and a SQL query, processes the results in batches, and returns aggregated statistics.
def process_large_query(connection_string: str, query: str, batch_size: int = 5000) -> dictconnection_string: Database connection string (e.g., postgresql://user:pass@host:port/db)query: SQL query to execute (e.g., SELECT order_id, amount, region FROM orders)batch_size: Number of rows to process in each batch (default: 5000)The function must:
amount field, count of rows){
"North": (1500000.50, 15000),
"South": (2300000.75, 23000),
"East": (1800000.25, 18000),
"West": (2100000.00, 21000)
}@generates
A fast database connector for loading data into Python with support for streaming and batch processing.