[WIP] HIVE-29370: Text-to-SQL with HMS MCP Server#6421
[WIP] HIVE-29370: Text-to-SQL with HMS MCP Server#6421deniskuzZ wants to merge 2 commits intoapache:masterfrom
Conversation
d267166 to
ec1ac70
Compare
|
I initally thought the implemenation will be in java using |
|
| """ | ||
| Metastore MCP Server — exposes Hive Metastore metadata via Model Context Protocol. | ||
|
|
||
| Backed by the Metastore Iceberg REST Catalog API. Provides tools for LLM agents |
There was a problem hiding this comment.
Only Iceberg tables can be supported?
What about other external tables? such as jdbc tables?
| String scriptPath; | ||
| if (hiveHome != null) { | ||
| scriptPath = hiveHome + File.separator + "scripts" + File.separator + | ||
| "nlsql" + File.separator + "nlsql_agent.py"; |
There was a problem hiding this comment.
I think this would be more readable with String.format(...).
| scriptPath = "scripts" + File.separator + "nlsql" + File.separator + | ||
| "nlsql_agent.py"; |
| String DIM = "\u001B[2m"; | ||
| String RESET = "\u001B[0m"; | ||
|
|
||
| beeLine.output(DIM + "Generating SQL for: " + RESET + CYAN + nlQuery + RESET); |
| // Read stderr (errors/warnings) | ||
| StringBuilder errBuilder = new StringBuilder(); | ||
| try (BufferedReader reader = new BufferedReader( | ||
| new InputStreamReader(process.getErrorStream()))) { | ||
| String errLine; | ||
| while ((errLine = reader.readLine()) != null) { | ||
| errBuilder.append(errLine).append("\n"); | ||
| } | ||
| } |
There was a problem hiding this comment.
These lines are identical to lines 1270-1281, should we have a helper method to reduce code duplication?
|
Thanks everyone for the review and feedback! |



What changes were proposed in this pull request?
MCP Server that exposes Hive Metastore metadata via the Iceberg REST Catalog API.
Why are the changes needed?
Expose Data Lake metadata through MCP
Does this PR introduce any user-facing change?
No
How was this patch tested?