Skip to content
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

service account and dataset in different projects #4

Open
StevenSalazarM opened this issue Jun 22, 2022 · 2 comments
Open

service account and dataset in different projects #4

StevenSalazarM opened this issue Jun 22, 2022 · 2 comments

Comments

@StevenSalazarM
Copy link

StevenSalazarM commented Jun 22, 2022

Hello,

thank you very much for the library, I agree it seems to be very promising!

Is it possible to add the project id as a parameter of the BigQueryClient?

Sometimes the project where the service account was created and the project of the dataset to be accessed may be different, for example in my case it fails due to the lack of the correct roles/permissions in the service account project, so the following piece of code of bqfetch.py fails:

          bq_client = bigquery.Client(
               credentials=credentials,
               project=credentials.project_id
           )

while using directly bigquery.Client():

bigquery.Client(credentials=credentials, project=bq_project_id)

works correctly.

Thank you,
Steven

@StevenSalazarM StevenSalazarM changed the title service account and data set in different projects service account and dataset in different projects Jun 22, 2022
@TristanBilot
Copy link
Owner

Hi,

Thanks for opening this issue!
This is a great idea, do not hesitate to open a pull request. Or tell me if you prefer let me do the modifications.

Cheers

@StevenSalazarM
Copy link
Author

It would be easier for me if you can do the modifications 🙂

Thank you,
Steven

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants