bq cmd查询Google表格发生“拒绝访问:BigQuery BigQuery:未找到包含Google云端硬盘范围的OAuth令牌”错误 [英] bq cmd query Google Sheet Table occur "Access Denied: BigQuery BigQuery: No OAuth token with Google Drive scope was found" Error
问题描述
我有一个与Google表连接的表,使用WebUI查询此表成功,但是如果我使用bq cmd查询,它会回显错误信息:
I have a table connect with Google Sheet, use WebUI query this table success, but if I use bq cmd query, It will echo error msg:
访问被拒绝:BigQuery BigQuery:没有带Google Drive的OAuth令牌
范围被发现
Access Denied: BigQuery BigQuery: No OAuth token with Google Drive scope was found
推荐答案
我假设您使用 bq rel =nofollow noreferrer> Cloud SDK 。
I presume you are using bq
command line tool which comes with Cloud SDK.
要使用 bq
,您必须获取凭据,最有可能的是你使用了
To use bq
you had to procure credentials, most likely you used
gcloud auth login
默认情况下,这些凭据不会获得驱动器范围。您必须通过 $ b
By default these credentials do not get drive scope. You have to explicitly request it via
gcloud auth login --enable-gdrive-access
现在运行 bq
即可使用Google云端硬盘数据。
Now running bq
to access Google Drive data should work.
这篇关于bq cmd查询Google表格发生“拒绝访问:BigQuery BigQuery:未找到包含Google云端硬盘范围的OAuth令牌”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!