Skip to content
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 11 commits into from
Jan 30, 2025
Merged

Conversation

jordanrburger
Copy link
Contributor

No description provided.

davidesner and others added 6 commits January 27, 2025 08:52
- 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
jordanrburger and others added 5 commits January 27, 2025 16:22
- 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
- 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.
Copy link
Contributor

@davidesner davidesner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@davidesner davidesner merged commit 0d68abc into master Jan 30, 2025
0 of 3 checks passed
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.

3 participants