Google Cloud Platform (GCP) has two types of accounts: user accounts and service accounts.
A user account is a Google account, familiarly known as Gmail, that can belong to multiple arbitrary projects. A service account, on the other hand, is an account that can be added to any project, for example, when a program accesses GCP.
When using BigQuery, there are times when you want to perform cross-project processing, such as writing a query using tables in Project A and Project B and saving the query results in a table in Project C.
I thought such things could only be done with a user account, since the process crosses projects, but I see that it can also be done with a service account.
way
It's easy to set up, just go to the portal of the project you want the service account to have additional access to, and click
Just press [IAM and Administration] - [IAM] - [+Add] and add as a project member with the email address of your service account.
The service account will still be authenticated with the key for that service account. Once authenticated, the added project can be accessed on the same basis as the previous project.
bonus
BigQuery has the ability to use Google Spreadsheets as a data source for tables, but if you register the email address of your service account in Spreadsheet Sharing, you will be able to use that table from your service account.