In bq
command, I am using a google account to login or authentication.
However, I want to change this account to another account (google account).
What's command line I can try?
You can run the bq command-line tool in an interactive shell where you don't need to prefix the commands with bq . To start interactive mode, enter bq shell . After launching the shell, the prompt changes to the ID of your default project. To exit interactive mode, enter exit .
Service Account based Authentication Click on Create. Now you should see an option to assign Service Account permissions. Under that you should find a drop down. Choose BigQuery-> BigQuery Admin.
In the Google Cloud console, go to the BigQuery page. In the query editor, enter the following statement: CALL BQ. ABORT_SESSION();
Go to Google Cloud Logging, and select Logs Router. Click on Create Sink. Give it a name. Chose BigQuery dataset as a destination and use your newly created dataset.
The command you are looking for is
gcloud auth login
After which you can switch between account by running bq auth list
to see the credentialed accounts and then use bq config set account <[email protected]>
to switch between them.
Or if you just want to log out as asked in the question:
gcloud auth revoke
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With