create-table-config
Generate table configurations for Apache Pinot using the MCP server, enabling streamlined setup by inputting JSON and optional validation skips.
Instructions
Create table configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tableConfigJson | Yes | ||
| validationTypesToSkip | No |
Implementation Reference
- mcp_pinot/server.py:174-186 (handler)MCP tool handler for 'create_table_config' decorated with @mcp.tool. It validates inputs via type hints (serving as schema), registers the tool, and delegates execution to PinotClient.create_table_config.@mcp.tool def create_table_config( tableConfigJson: str, validationTypesToSkip: Optional[str] = None ) -> str: """Create table configuration""" try: results = pinot_client.create_table_config( tableConfigJson, validationTypesToSkip, ) return json.dumps(results, indent=2) except Exception as e: return f"Error: {str(e)}"
- mcp_pinot/pinot_client.py:455-482 (helper)Core helper function in PinotClient class that implements the HTTP POST request to the Pinot controller endpoint for creating a table configuration.def create_table_config( self, tableConfigJson: str, validationTypesToSkip: str | None = None, ) -> dict[str, Any]: url = f"{self.config.controller_url}/{PinotEndpoints.TABLES}" params: dict[str, str] = {} if validationTypesToSkip: params["validationTypesToSkip"] = validationTypesToSkip headers = self._create_auth_headers() headers["Content-Type"] = "application/json" response = requests.post( url, headers=headers, params=params, data=tableConfigJson, timeout=(self.config.connection_timeout, self.config.request_timeout), verify=True, ) response.raise_for_status() try: return response.json() except requests.exceptions.JSONDecodeError: return { "status": "success", "message": "Table config creation request processed.", "response_body": response.text, }