Reputation: 31
I have service accounts per BigQuery project. I need to put joins on tables in different projects using service accounts configured on each project.
Here is what i have:
I can connect to tables using these service accounts in respective projects but when I try to join data on different tables which are in different projects, I get access errors.
Reason is when i build the BigQuery service , I am using a JSON file which is specific to project as it contains the project id.
How can I join tables in different projects using service accounts?
Upvotes: 0
Views: 2687
Reputation: 172944
Assuming you run your query by Service_EmailAccount1
In this case you should just share your respective dataset in project2 with Service_EmailAccount1
And you must make sure both datasets are in the same location
That's all you need
See more about Access Control concept in BigQuery
Upvotes: 2
Reputation: 2541
I believe that the following idea might be helpful, for example, you are using service_emailaccount1 to get access of project1,
Then, I believe that both accounts will access project1.
This is what I will do to get access to several projects, and I am not sure we can use different service account to querying from different project in one query. Thx
Upvotes: 1