我使用insertAll()
插入数据,但是DataInsertAllRespone.InsertErrors
返回我插入的每一行的相同错误。
这些错误只给了我这个领域
**Data.ErrorProto.Reason** which contains: **"stopped"**
。
这是调用insertAll()的方法:
public bool InsertAll(BigqueryService s, String datasetId, String tableId, List<TableDataInsertAllRequest.RowsData> data)
{
TabledataResource t = s.Tabledata;
TableDataInsertAllRequest req = new TableDataInsertAllRequest()
{
Kind = "bigquery#tableDataInsertAllRequest",
Rows = data /*Posar aquí les files per pujar al BigQuery*/
};
TableDataInsertAllResponse response = t.InsertAll(req, projectId, datasetId, tableId).Execute();
if (response.InsertErrors != null) return true;
return false;
}
会发生什么?为什么不能上传数据?
*编辑:*我意识到,如果我上传少于6行正确工作,但行大小约为1,6 Kb和最大行大小为20 Kb。
谢谢,罗杰
发布于 2014-02-13 15:31:54
几天前我找到了解决办法。当您使用BigQuery ()方法将数据流到insertAll中时,您可以一次流多个行。如果其中一个行是错误的,Data.ErrorProto.Reason包含此错误的消息,例如,“无法将值转换为字符串”。其他行在Data.ErrorProto.Reason.中包含“已停止”。
如果您曾经看到此错误,则可能存在行格式中的不一致。
https://stackoverflow.com/questions/21461317
复制相似问题