https://www.growthbook.io/ logo
h

hallowed-midnight-4935

06/09/2022, 1:48 PM
Hi for using bigquery using env variable do we need to give OAUTH permission to the service account?
f

future-teacher-7046

06/09/2022, 1:49 PM
I don't believe so. We only call BigQuery from our back-end.so we shouldn't need OAuth.
h

hallowed-midnight-4935

06/09/2022, 1:50 PM
but we got this error while uploading BQ private key file: Access Denied: BigQuery BigQuery: Missing required OAuth scope. Need BigQuery or Cloud Platform read scope.
any idea about it?
f

future-teacher-7046

06/09/2022, 1:52 PM
The service account needs to have the following roles • Data Viewer • Metadata Viewer • Job User
h

hallowed-midnight-4935

06/09/2022, 1:52 PM
ah alright. but the problem is the same key file worked in upload mode, but not when we give it as a secret
f

future-teacher-7046

06/09/2022, 1:54 PM
What env variables are you using?
GOOGLE_APPLICATION_CREDENTIALS
or something else?
h

hallowed-midnight-4935

06/09/2022, 1:59 PM
using
GOOGLE_APPLICATION_CREDENTIALS
and verified that the file is same as well
f

future-teacher-7046

06/09/2022, 2:00 PM
Hmm. And are you getting this error running locally or within GCP?
h

hallowed-midnight-4935

06/09/2022, 2:01 PM
this is with GCP, we are using GKE
f

future-teacher-7046

06/09/2022, 2:04 PM
My guess is that either the credentials path is wrong or the environment variable isn't being set for the container. That would cause the client libraries to use the service account tied to GKE instead.
👍 1
d

damp-fall-73365

06/10/2022, 8:25 AM
hi @future-teacher-7046 we have set the env value of GOOGLE_APPLICATION_CREDENTIALS as the path and the path conatins the key json attaching screenshot Moreover i am getting below error The file at /opt/growthbook.json does not exist, or it is not a file. ENOENT: no such file or directory, lstat '/opt/growthbook.json
f

future-teacher-7046

06/10/2022, 11:55 AM
Hmm. That's strange. Is it possibly a permissions error?
d

damp-fall-73365

06/11/2022, 5:35 PM
not sure i have a question if i do echo for GOOGLE_APPLICATION_CREDENTIALS inside the pod should it print the value of SA key or the path of SA key
f

future-teacher-7046

06/11/2022, 5:36 PM
It should be the path I think
d

damp-fall-73365

06/14/2022, 6:36 AM
but still it throws error The file at /opt/growthbook.json does not exist, or it is not a file. ENOENT: no such file or directory, lstat '/opt/growthbook.json
as u can see above
can u please help us what should be the permission of that SA.Json file ??
7 Views