peaka_get_table_statistics
Retrieve column-level statistics for a Peaka table to estimate distinct-value fractions, improving cardinality estimation and query optimization.
Instructions
Get column-level statistics for a table in the Peaka project. Returns the catalog/schema/table identifiers and a per-column distinctFraction (estimated fraction of distinct values vs total rows), useful for cardinality estimation and query optimization.
If you do not already know the projectId for the current task, call peaka_list_projects first and ask the user which project to use. Remember the chosen projectId for subsequent calls in this conversation.Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"catalogId": "<catalogId>",
"schemaName": "<schemaName>",
"tableName": "<tableName>"
},
"name": "peaka_get_table_statistics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| catalogId | Yes | The catalog's id, or its name as written in SQL (e.g. "stripe" in stripe.payment.charges). "peaka" with schemaName query or mtquery is the saved queries, with any other schema the Peaka tables. | |
| projectId | Yes | The Peaka project ID to run against. | |
| tableName | Yes | ||
| schemaName | Yes |