One thing I am stuck with Cloud deployment is that...
# ask-community
p
One thing I am stuck with Cloud deployment is that , I have a json file for bigquery auth of service account. On local I have set that variable pointing to file path, which works well and connects to big query, but on cloud deployment how can I make it work? Is there a way I can upload a creds file and then set up a deployment variable for GOOGLE_AUTH? Let me know
s
Adding some context from our DMs: We attempted: There isn't currently a way to add a file to serverless that is outside of your Git repo. However, it appears Google clients will work if you translate the values from the JSON file into an environment variable that points at a JSON string. So you could do this:
Copy code
export GOOGLE_DEV_CREDENTIALS='{
  "type": "service_account",
  "project_id": "elementl-dev",
  ...
}'
Then in your code you use:
Copy code
client = bigquery.Client()
And then in Dagster Cloud you'd create the
GOOGLE_DEV_CREDENTIALS
environment variable following https://docs.dagster.io/dagster-cloud/developing-testing/environment-variables-and-secrets#creating-new-variables But the result was: It says ,
Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application
Which I did as well but it shows the json keys in project and doesnrt deploy
d
Could you add the file within a pre install shell script? https://docs.dagster.io/dagster-cloud/deployment/serverless#lifecycle-hooks