-
Notifications
You must be signed in to change notification settings - Fork 112
Add snowflake support to connections pane #9219
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
base: main
Are you sure you want to change the base?
Conversation
8e24bb1
to
577cedc
Compare
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.
a few questions about previewing data, but code looks good! FYI: I don't have any snowflake creds so didn't try anything out locally. lmk if you'd like me to test it and I can hunt some down!
query = f'SELECT * FROM "{database.name}"."{schema.name}"."{table.name}" LIMIT 1000;' | ||
var_name = var_name or "conn" | ||
preview = self.conn.cursor().execute(query).fetch_pandas_all() | ||
sql = ( |
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.
thanks for adding this in! 🙌
|
||
database, schema, table = path | ||
|
||
# Use DuckDB's native pandas integration via .df() method |
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.
should this be snowflake? or does this use the builtin duckdb?
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.
oops! I copied the duckdb implements as a template and forgot to remove
# Use DuckDB's native pandas integration via .df() method | ||
query = f'SELECT * FROM "{database.name}"."{schema.name}"."{table.name}" LIMIT 1000;' | ||
var_name = var_name or "conn" | ||
preview = self.conn.cursor().execute(query).fetch_pandas_all() |
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.
and it doesn't look like pandas is a required dependency, should we try/except to make sure it is available?
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.
if pandas is not installed, this will error with a reasonably error message surfaced to the user through a notification in Positron.
This is hopefully enough to get users to install pandas.
Addresses #8580
TODO:
Release Notes
New Features
Bug Fixes
QA Notes
Request a Snowflake Developer account with IT, then use: