-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 Client should allow a Connection object to be passed in #7122
Comments
@tswast Can you comment? |
@tswast that, and also overriding the URL of the Connection: https://github.com/Kaggle/docker-python/blob/2653b37c15556996c964fc6cd33197030c4a4228/patches/kaggle_gcp.py#L25. Thanks! |
In general we suggest customers set the I'd like for there to be some way to reconcile this with how the gRPC-based clients work rather than make Lines 133 to 140 in 4a0131b
Transport even takes a Lines 47 to 52 in 4a0131b
Since the Connection object for our hand-written HTTP-based clients is similar to the XTransport object in our gRPC-based clients, maybe we add a "transport" argument that accepts a Connection. Unfortunately they are different in one material way: in gRPC clients it is an error to supply both a transport and credentials object (since transport contains the credentials object). @crwilcox @tseaver WDYT? |
I filed a related issue but regarding Magics: #8024. |
We (at Kaggle) support a BigQuery Proxy which allows users of our managed Notebooks (Kernels) to query BigQuery without any setup and for free. We do this by allowing them to query public datasets using our own credentials, injected in by a proxy we run that receives requests from the client and forwards it to BigQuery. To support this in the BigQuery client the users use, we have to monkeypatch the client and update the internal instance variable _connection to our own subclass of it (https://github.com/Kaggle/docker-python/blob/2653b37c15556996c964fc6cd33197030c4a4228/patches/kaggle_gcp.py#L48).
It would be less hacky if we could pass the Connection object in the client constructor like we do the Credentials object, or be able to set it as a class variable when we subclass Client.
The text was updated successfully, but these errors were encountered: