Hi for using bigquery using env variable do we nee...
# announcements
h
Hi for using bigquery using env variable do we need to give OAUTH permission to the service account?
f
I don't believe so. We only call BigQuery from our back-end.so we shouldn't need OAuth.
h
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
The service account needs to have the following roles • Data Viewer • Metadata Viewer • Job User
h
ah alright. but the problem is the same key file worked in upload mode, but not when we give it as a secret
f
What env variables are you using?
GOOGLE_APPLICATION_CREDENTIALS
or something else?
h
using
GOOGLE_APPLICATION_CREDENTIALS
and verified that the file is same as well
f
Hmm. And are you getting this error running locally or within GCP?
h
this is with GCP, we are using GKE
f
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
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
Hmm. That's strange. Is it possibly a permissions error?
d
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
It should be the path I think
d
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 ??