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

Bigquery: ibis.connect doesn't pass through parameters parsed from connection string #9456

Closed
ssabdb opened this issue Jun 27, 2024 · 1 comment · Fixed by #9482
Closed
Labels
bigquery The BigQuery backend bug Incorrect behavior inside of ibis
Milestone

Comments

@ssabdb
Copy link
Contributor

ssabdb commented Jun 27, 2024

With version 9.0.0 of ibis, passing:

ibis.connect(bigquery://my_project/my_dataset?location=us-central1)

Does not pass the parameters to backend._from_url. I would expect location=us-central1 to be passed to the underlying bigquery connection.

I'm not sure if this is intentional, because the ibis.connect function goes to the trouble of parsing the parameters from the connection string but then uses orig_kwargs for

return backend._from_url(url, **orig_kwargs)

Alternatively, it could be solved in a backend specific way for bigquery by parsing out the configuration here:

def _from_url(self, url: str, **kwargs):

My usecase (and why I don't particularly want to specify location directly) is that I want users to be able to pass any connection string they want through to Ibis from configuration and use this as a means to configure the connection appropriately, subject to me filtering supported backends for my application. I haven't tried parameters with any other of the backends.

This is similar to the sqlalchemy connection string logic mentioned in #2532 (comment).

Any advice on how the general ibis connection strings handle parameters like this for a consistent user experience? I'd be happy to submit a PR for the latter option, it should be quite simple.

@cpcloud
Copy link
Member

cpcloud commented Jun 27, 2024

Looks like a bug, I'll poke around a bit to confirm!

@cpcloud cpcloud added the bigquery The BigQuery backend label Jun 30, 2024
@cpcloud cpcloud added this to the 9.2 milestone Jun 30, 2024
@cpcloud cpcloud added the bug Incorrect behavior inside of ibis label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery The BigQuery backend bug Incorrect behavior inside of ibis
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants