update-table-config
Modify table configurations in Apache Pinot by updating the table name and config JSON. Skip specified validation types to customize updates.
Instructions
Update table configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tableConfigJson | Yes | ||
| tableName | Yes | ||
| validationTypesToSkip | No |
Implementation Reference
- mcp_pinot/server.py:189-204 (handler)FastMCP tool handler for the 'update_table_config' tool. Defines input schema via type annotations (tableName: str, tableConfigJson: str, optional validationTypesToSkip: str) and delegates execution to PinotClient.update_table_config, returning JSON results or error.@mcp.tool def update_table_config( tableName: str, tableConfigJson: str, validationTypesToSkip: Optional[str] = None, ) -> str: """Update table configuration""" try: results = pinot_client.update_table_config( tableName, tableConfigJson, validationTypesToSkip, ) return json.dumps(results, indent=2) except Exception as e: return f"Error: {str(e)}"
- mcp_pinot/pinot_client.py:484-512 (helper)Core implementation of table config update logic. Performs authenticated HTTP PUT request to Pinot controller's /tables/{tableName} endpoint with tableConfigJson payload and optional validationTypesToSkip param.def update_table_config( self, tableName: str, tableConfigJson: str, validationTypesToSkip: str | None = None, ) -> dict[str, Any]: url = f"{self.config.controller_url}/{PinotEndpoints.TABLES}/{tableName}" params: dict[str, str] = {} if validationTypesToSkip: params["validationTypesToSkip"] = validationTypesToSkip headers = self._create_auth_headers() headers["Content-Type"] = "application/json" response = requests.put( 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 update request processed.", "response_body": response.text, }