3
votes

I'm running Datalab locally using docker after following advice here: https://github.com/googledatalab/datalab/wiki/Getting-Started

I'm trying to run the following test snippet:

%%bq query
#SQL query to return total births by year
SELECT CAST(source_year AS string) AS year, COUNT(is_male) AS birth_count
FROM `publicdata.samples.natality`
GROUP BY year
ORDER BY year DESC
LIMIT 15

But when I do I get the following:

[2018-01-15 14:50:39,126] {_metadata.py:81} INFO - Compute Engine Metadata server unavailable.

"No application credentials found. Perhaps you should sign in."

Taking the hint I then opened a bash on the running docker container and ran:

gcloud auth application-default login

And followed the authentication steps with my user that has access to a project with billing account etc. The messages indicate that I was successful:

Credentials saved to file: [/root/.config/gcloud/application_default_credentials.json]

These credentials will be used by any library that requests
Application Default Credentials.

But the problem persists with the same "No applications credentials found..."

What do I need to do to fix my datalab environment?

1

1 Answers

3
votes

I managed to get past this by logging in at the top right hand corner.