get_table_properties
Retrieve detailed properties of a specific table within an Iceberg data lakehouse, including metadata and schema information, for streamlined data management and analysis.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | Yes | ||
| table_name | Yes |
Implementation Reference
- iceberg_mcp/iceberg_server.py:66-84 (handler)Handler function for the get_table_properties MCP tool. Loads the Iceberg catalog and table, retrieves partition specs, sort orders, snapshot summary (size and records), and table properties.@mcp.tool() def get_table_properties( namespace: str, table_name: str ) -> dict: catalog: Catalog = get_catalog() table_obj = catalog.load_table((namespace, table_name)) partition_specs = [p.dict() for p in table_obj.metadata.partition_specs] sort_orders = [s.dict() for s in table_obj.metadata.sort_orders] current_snapshot = table_obj.current_snapshot() if not current_snapshot or not current_snapshot.summary: return {} return { "total_size_in_bytes": current_snapshot.summary["total-files-size"], "total_records": current_snapshot.summary["total-records"], "partition_specs": partition_specs, "sort_orders": sort_orders, **table_obj.properties }