我们在 tabledata.list 过程中遇到错误,消息如下:
API limit exceeded: Unable to return a row that exceeds the API limits. To retrieve the row, export the table.
它未在 https://cloud.google.com/bigquery/troubleshooting-errors#errortable 列出.
这个错误每次都会发生。
我们可以正常将该表导出到GCS中。结果看起来很正常(没有非常大的行)。
我们设法在实际错误发生之前检索到多个结果页面。
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "API limit exceeded: Unable to return a row that exceeds the API limits. To retrieve the row, export the table.",
"reason" : "apiLimitExceeded"
} ],
"message" : "API limit exceeded: Unable to return a row that exceeds the API limits. To retrieve the row, export the table."
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145) ~[com.google.api-client.google-api-client-1.21.0.jar:1.21.0]
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113) ~[com.google.api-client.google-api-client-1.21.0.jar:1.21.0]
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40) ~[com.google.api-client.google-api-client-1.21.0.jar:1.21.0]
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321) ~[com.google.api-client.google-api-client-1.21.0.jar:1.21.0]
这是什么意思?我们如何解决这个错误?
最佳答案
对于给您带来的不便,我们深表歉意。
这是 tabledata.list 方法的一个已知问题。 问题是我们有一些基础设施限制,目前无法从 tabledata.list 返回非常大行。
large是一个相对词。不幸的是,某些行在以 json 表示时尺寸较小,但在以我们的内部格式表示时会消耗大量内存。
当前的解决方法如错误消息中所述:导出表。
从长远来看,我们正在积极努力改进我们的系统以克服这一限制。请继续关注:)
关于google-bigquery - BigQuery API 超出限制错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37547711/