Reputation: 2541
I am trying to use bq command inside datalab, but when I try to use it, it pops up a message and require me to set up my credentials, as shown below,
However, I can't paste the verification code into the pop message. Basically, I was stuck on this step.
Any idea how to solve this? Thank you.
Upvotes: 0
Views: 416
Reputation: 424
In the long term, I think we will save the Datalab credentials for BQ. then after signing in Datalab, !bq will use saved credentials.
As a workaround, you can run bq outside Datalab with interactive command prompt, go through the token verification process, and then copy the token file into Datalab. For example, assume you have done the verification process on the machine hosting Datalab, you can copy the creds file into Datalab by running the following cell:
!cp /content/.bigquery.v2.token ~/.bigquery.v2.token
And you need to do it every time you restart Datalab.
Upvotes: 2