-
Notifications
You must be signed in to change notification settings - Fork 593
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
fix(snowflake): properly pass schema and database for sqlglot generation #9221
fix(snowflake): properly pass schema and database for sqlglot generation #9221
Conversation
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 putting this in @dlovell !
Small naming nit -- I just spent a long time eliminating the use of the word schema
in the hierarchical sense (although I missed this bit, thanks for flagging it!). I think the fix here is good, I just want to make sure that grepping for schema
across the codebase returns name->type mappings
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
f4a89e1
to
018a0fd
Compare
Snowflake tests passing:
We should probably have a test for this so we don't regress -- I'll try to sort that out in a followup |
Thanks for the fix @dlovell ! |
xref ibis-project#9221 We weren't handling passing in `catalog/database` as the `database` kwarg, despite our documentation telling users to do that. This was fixed in the above PR -- here I'm adding a (very gross) test to ensure that both connection methods work.
xref ibis-project#9221 We weren't handling passing in `catalog/database` as the `database` kwarg, despite our documentation telling users to do that. This was fixed in the above PR -- here I'm adding a (very gross) test to ensure that both connection methods work.
xref #9221 We weren't handling passing in `catalog/database` as the `database` kwarg, despite our documentation telling users to do that. This was fixed in the above PR -- here I'm adding a test to ensure that both connection methods work.
* test: add test of issues with ibis' snowflake connection as of 9.0.0 * fix(snowflake): monkeypatch snowflake setup * add a hotfix for proper snowflake connection initialization (pending next release that includes fix(snowflake): properly pass schema and database for sqlglot generation ibis-project/ibis#9221) * add a test for the expectation of initial snowflake connection state re catalog/database based on create_object_udfs
Description of changes
use_stmt
to prevent invalidUSE SCHEMA
statement whencurrently
use_stmt
is generated like'USE SCHEMA "DATABASE/SCHEMA"'
, it should be'USE SCHEMA "DATABASE"."SCHEMA"'