-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/sql query interface #6
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add SQL query capabilities
- Updated `uv.lock` to include new dependencies: - `snowflake-connector-python` - `snowflake-snowpark-python` - Additional supporting packages like `asn1crypto`, `cloudpickle`, `filelock`, etc. - Enhanced configuration handling in `config.py`: - Added default value for `storage_api_url` - Improved environment variable validation - Ensured `KBC_STORAGE_TOKEN` is required - Refined server configuration and logging in `server.py`
- Replaced Snowpark session with direct Snowflake connector for more flexible query handling - Implemented async Snowflake connection context manager - Improved table detail and query methods to use JSON parsing and CSV output - Added error handling and connection management for Snowflake interactions
- Reorganized import statements for better readability - Simplified column info generation with a more concise list comprehension - Removed unnecessary whitespace and blank lines - Maintained existing functionality while improving code style
- Added `has_snowflake_config()` method to Config class for better credential validation - Refactored Snowflake connection logic in server.py to use direct connection method - Updated error messages for Snowflake configuration - Simplified table metadata retrieval using storage client - Removed async context manager for Snowflake connection in favor of direct connection management
- Added .env to gitignore to prevent sensitive environment configuration from being tracked - Ensures local environment variables remain private and secure
…ola/keboola-mcp-server into keboola-mcp-server/feature/sql-query-interface
- added a new environment variables handling 'KBC_SNOWFLAKE_SCHEMA'. - simplified the logic for the query_table that explicitly requires to include the DB name to make queries running correctly. - commented the query_table_data which will be fixed tomorrow. - added extra query_table exception handling too. - updated the documentation.
davidesner
approved these changes
Jan 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.