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

docs(snowflake): fix the syntax for passing schema #9831

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/backends/snowflake.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ con = ibis.snowflake.connect(
user="user",
password="password",
account="safpqpq-sq55555",
database="IBIS_TESTING/IBIS_TESTING",
database="my_database",
schema="my_schema",
)
```

Expand Down Expand Up @@ -119,7 +120,8 @@ APIs. All values of `authenticator` are supported.
con = ibis.snowflake.connect(
user="user",
account="safpqpq-sq55555",
database="my_database/my_schema",
database="my_database",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
database="my_database",
database="my_catalog/my_database",

Does it make sense to have something like this?

Copy link
Member

Choose a reason for hiding this comment

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

Hm, probably not. The idea is to do as little customization here so we can just dump kwargs to the underlying connector.

Copy link
Contributor Author

@deepyaman deepyaman Aug 14, 2024

Choose a reason for hiding this comment

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

Sorry, what I meant is, based on https://github.com/ibis-project/ibis/blob/9.3.0/ibis/backends/snowflake/tests/test_client.py#L411-L412, it seems like you can pass in the form database="catalog/database". However, this isn't as clear from the examples, so I was wondering if it makes sense to document it as such.

Not proposing any functionality change.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I should clarify that I believe we removed that parsing functionality in 9.0. I don't think the comment is relevant anymore.

schema="my_schema",
warehouse="my_warehouse",
authenticator="externalbrowser",
)
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/snowflake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def get_schema(
# snowflake puts temp tables in the same catalog and database as
# non-temp tables and differentiates between them using a different
# mechanism than other database that often put temp tables in a hidden
# or intentionall-difficult-to-access catalog/database
# or intentionally-difficult-to-access catalog/database
table = sg.table(
table_name, db=database, catalog=catalog, quoted=self.compiler.quoted
)
Expand Down
Loading