Skip to content

fix: resolve execute_sql AttributeError, default warehouse_id from env#7

Open
TrevorMcCormick wants to merge 1 commit into
JustTryAI:masterfrom
TrevorMcCormick:master
Open

fix: resolve execute_sql AttributeError, default warehouse_id from env#7
TrevorMcCormick wants to merge 1 commit into
JustTryAI:masterfrom
TrevorMcCormick:master

Conversation

@TrevorMcCormick
Copy link
Copy Markdown

This PR address an issue and offers an enhancement:

Bug Fix

  • The execute_sql tool called sql.execute_sql(), which doesn't exist in src/api/sql.py. This caused: {"error": "module 'src.api.sql' has no attribute 'execute_sql'"}
  • Changed to sql.execute_and_wait() which polls for query completion and returns results.

Enhancement

  • Made warehouse_id optional by falling back to the DATABRICKS_SQL_WAREHOUSE_ID environment variable. This lets users configure it once in their MCP server config (e.g. claude_desktop_config.json) rather than passing it on every call.

… env

- The execute_sql tool called sql.execute_sql(), which doesn't exist in src/api/sql.py. Changed to sql.execute_and_wait() which polls for query completion and returns results.
- Also made warehouse_id optional by falling back to the
DATABRICKS_SQL_WAREHOUSE_ID environment variable, so users can configure it once in their server config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant