0

i am trying to access bigquery using python . even though after executing "gcloud auth login" getting below error.

google.auth.exceptions.ReauthFailError: Reauthentication failed. Reauthentication challenge could not be answered because you are not in an interactive session.

what can be issue here

1
  • Can you follow this tutorial to access BigQuery using python? Also, could you clarify more on your use case? Commented Nov 18, 2022 at 9:51

1 Answer 1

2

You can solve this problem by creating a service account and set up the Cloud SDK to use the service account.

Example command:

gcloud auth activate-service-account account-name --key-file=/fullpath/service-account.json

Other way is to set up the environment variables for the Python script to use while accessing BigQuery.

Example command:

export GOOGLE_APPLICATION_CREDENTIALS=/fullpath/service-account.json
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.