-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 listTables(DatasetId) does not use project overrided in DatasetId #1123
Comments
Hi Tim! Actually this behavior is intended. All service operations (create/delete/get/list) are tied to the project id you provided to Do you have a specific use case for creating |
Well for public datasets I don't have permission to access the BigQuery API |
So, it looks like I can work around this issue using BigQueryOptions, but it does feel wrong.
I'm not a member of the |
At the very least, we should raise an exception if the project ID is populated in the DatasetId. It should not be silently ignored. |
I gave some thoughts on this and I think you are right. I'll try to wrap up a PR, I'll CC you so you can give it a try as soon as it's ready. |
My Google Application Default Credentials are set to the swast-scratch project, but I wish to list the tables in the
publicdata
project'ssamples
dataset. This is a public dataset.Example code that displays this issue:
It fails with the error:
"message" : "Not found: Dataset swast-scratch:samples"
, so it appears that it is not using the project that I set in the DatasetId.http://googlecloudplatform.github.io/gcloud-java/0.2.5/apidocs/com/google/cloud/bigquery/DatasetId.html#of-java.lang.String-java.lang.String-
The text was updated successfully, but these errors were encountered: