Reputation: 453
While using BigQuery Java Client, need to join between Table A present in project A.dataset A and Table B present in project B.dataset B
I am able to run the query using BigQuery console and get cross-project access to the tables by specifying the complete table id i.e. project.dataset.table
Is it possible to add both projects A and B to the same service account, so that the client can be initialized with a single Google Service Account Configuration and query the tables from both the projects?
Thanks.
Upvotes: 9
Views: 3090
Reputation: 576
Yes, it is possible to add the same Service Account to different projects.
Once you have created your Service Account in one project, copy the e-mail. Navigate to Cloud IAM page, choosing your second project. Add the Service Account as a member with necessary BigQuery role to your second project.
Upvotes: 8