tessl install tessl/pypi-azure-data-tables@12.7.0Microsoft Azure Data Tables Client Library for Python
Agent Success
Agent success rate when using this tile
90%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.97x
Baseline
Agent success rate without this tile
93%
A tool that retrieves customer records from Azure Table Storage and exports them with selective field projection to minimize bandwidth usage and improve performance.
Your company stores customer records in Azure Table Storage with comprehensive information about each customer. However, different reports require different subsets of customer data. The marketing team needs contact information, the analytics team needs behavioral data, and the finance team needs transaction summaries. Loading all fields for every query wastes bandwidth and slows down processing.
Build a customer data export tool that retrieves entities from Azure Table Storage with selective field projection. The tool should allow users to specify which fields they want to retrieve, and only those fields should be returned from the service.
Connection Management: Connect to Azure Table Storage using a connection string provided via environment variable AZURE_TABLES_CONNECTION_STRING.
Selective Field Retrieval: Implement a function that retrieves customer entities with only the specified fields. The function should:
Query with Projection: Implement a function that queries entities matching specific criteria while retrieving only specified fields. The function should:
Bandwidth Efficiency: The tool must use property projection at the API level (not filtering in code after retrieval) to reduce data transfer.
Given a table with entities containing fields (PartitionKey, RowKey, Name, Email, Phone, Address, Age, City), when listing all entities with select=['Name', 'Email'], the returned entities should only contain PartitionKey, RowKey, Name, and Email fields @test
Given a table with customer entities, when querying with filter "Age gt 25" and select=['Name', 'City'], only entities matching the filter should be returned and each should only contain PartitionKey, RowKey, Name, and City fields @test
Given a table with entities, when retrieving entities with select=['Email'] and one entity has no Email field, that entity should be returned with only PartitionKey and RowKey @test
@generates
from typing import List, Dict, Any, Iterator
def get_table_client(table_name: str):
"""
Creates and returns a TableClient for the specified table.
Uses AZURE_TABLES_CONNECTION_STRING environment variable.
Args:
table_name: Name of the table
Returns:
TableClient instance
"""
pass
def list_entities_with_projection(table_name: str, select_fields: List[str]) -> Iterator[Dict[str, Any]]:
"""
Retrieves all entities from a table with only specified fields.
Args:
table_name: Name of the table
select_fields: List of field names to retrieve
Returns:
Iterator of entity dictionaries containing only selected fields
(plus PartitionKey and RowKey which are always included)
"""
pass
def query_entities_with_projection(table_name: str, filter_query: str, select_fields: List[str]) -> Iterator[Dict[str, Any]]:
"""
Queries entities matching a filter with only specified fields.
Args:
table_name: Name of the table
filter_query: OData filter expression
select_fields: List of field names to retrieve
Returns:
Iterator of entity dictionaries matching the filter,
containing only selected fields (plus PartitionKey and RowKey)
"""
passProvides Azure Table Storage client functionality including entity querying with property projection support.
@satisfied-by