【发布时间】:2018-09-27 09:50:49
【问题描述】:
将日期字段作为对象发送到类型为时间戳的 BigQuery 表时,google java API 库不会引发异常,但不会引发数据。检查“InsertAllResponse”响应类型返回包括错误“此字段不是记录”。
例如
Hashmap<String,Object> rowContent = new Hashmap<>();
rowContent.put("Time", new Date());
rowContent.put("Name", "Harry");
然后
BigQuery bq = BigQueryOptions.getDefaultInstance().getService();
TableId tableId = TableId.of(datasetName, tableName);
InsertAllRequest.Builder insertReqBuilder = InsertAllRequest.newBuilder(tableId);
insertReqBuilder.addRow({some string}, row);
InsertAllResponse response = bigquery.insertAll(insertReqBuilder.build());
返回一个 response.hasErrors() true。
还报告了 python here 和 firebase here 和 javascript here
【问题讨论】: