我按照以下建议使用docker在本地运行Datalab:https://github.com/googledatalab/datalab/wiki/Getting-Started
我正在尝试运行以下测试代码段:
%%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
但是当我这样做时,我得到以下内容:
[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."
接受提示我然后在正在运行的docker容器上打开一个bash并运行:
gcloud auth application-default login
我的用户可以访问具有结算帐户等项目的身份验证步骤。这些消息表明我成功了:
Credentials saved to file: [/root/.config/gcloud/application_default_credentials.json]
These credentials will be used by any library that requests
Application Default Credentials.
但问题仍然存在于“找不到应用程序凭据......”
我需要做些什么来修复我的数据库环境?
答案 0 :(得分:2)
我设法通过登录右上角来解决这个问题。