GoogleCloudPlatform / bigquery-antipattern-recognition

Utility to identify and rewrite common anti patterns in BigQuery SQL syntax
Apache License 2.0
76 stars 26 forks source link

I want to run code with service account and region #41

Closed emincanoguz11 closed 4 months ago

emincanoguz11 commented 8 months ago

Hi,

I want to run code with service account and change region from US to EU. But in this case I have failed. Firstly, I want to run code in local environment with service account but I am failed. Also I try to run in cloud but I am also failed. Only I success case is I run with documentation is success but I see only US region data. In my case this does not solve my problem.

I don't understand how to give Cloud Run service account format in Cloud Run. I give an email for service account but I get an error in Cloud Run. Also I give a destination folder for service account destination but I get failed too.

So can you write documentation for these cases again?

Also my local environment is MacOs. Is this a problem for running in locally for this code?

Kind regards, Emin

emincanoguz11 commented 8 months ago

@franklinWhaite

Hi Franklin,

Can you please take a look at this issue in your spare time? We are locked for this issue. I can see the regional branch, but I don't know how the service account works? Also my teammate Omer is sending mail for this reason maybe we will talk in this issue to everyone see this but if it is difficult to follow we will continue mail traffic. It doesn't matter for me and teammate.

Best regards, Emin

franklinWhaite commented 8 months ago

Hi @emincanoguz11, thanks for reaching out!

I believe the region issue has been addressed. (Please let us know if this is not the case).

I am currently looking into the service account topic and will reach out to you with some insight soon.

Regards, Frank

franklinWhaite commented 8 months ago

Regarding the service account issue, please follow the steps here.

When specifying the service account in the CLOUD_RUN_JOB_SA variable, make sure to use a service account with the necessary permissions to query INFORMATION_SCHEMA.JOBS.

emincanoguz11 commented 8 months ago

We have a super user service account and we see another app to querying in INFORAMTION_SCHEMA.JOBS but we don't know how we give in CLOUD_RUN_JOB_SA variable. Is this part or email for service account? Documentation is not clearly for this variable.

Also we want to debug code in locally but we cannot running with GOOGLE_APPLICATION_CREDENTIALS parameter.