Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to log out account in bq command in Bigquery

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?

like image 529
user3737020 Avatar asked Jun 13 '14 08:06

user3737020


People also ask

How do you run a bq command?

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 .

How do I access BigQuery with a service account?

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.

How do you stop a query in BigQuery?

In the Google Cloud console, go to the BigQuery page. In the query editor, enter the following statement: CALL BQ. ABORT_SESSION();

How do I view BigQuery logs?

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.


1 Answers

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
like image 158
Rohit Avatar answered Oct 07 '22 20:10

Rohit