当尝试使用Go的Google API客户端库将数据上传到BigQuery时,收到以下响应。{ "error": { "errors": [ { "domain": "global", "reason": "badRequest", "message": "Invalid Upload Request" } ], "code": 400, "message": "Invalid Upload Request" }}我的工作描述符如下:j := &bigquery.Job{ Configuration: &bigquery.JobConfiguration{ Load: &bigquery.JobConfigurationLoad{ DestinationTable: &bigquery.TableReference{ projectId, "xyz", name + "_" + yyyymmdd, }, SkipLeadingRows: 1, FieldDelimiter: "|", MaxBadRecords: 3, Schema: &bigquery.TableSchema{ []*bigquery.TableFieldSchema{ {Name: "f1", Type: "STRING"}, {Name: "f2", Type: "STRING"}, {Name: "f3", Type: "STRING"}, {Name: "f4", Type: "STRING"}, {Name: "f5", Type: "STRING"}, {Name: "f6", Type: "STRING"}, {Name: "f7", Type: "STRING"}, {Name: "f8", Type: "STRING"}, {Name: "f9", Type: "STRING"}, {Name: "f10", Type: "STRING"}, {Name: "f11", Type: "STRING"}, {Name: "f12", Type: "STRING"}, {Name: "f13", Type: "STRING"}, {Name: "f14", Type: "STRING"}, {Name: "f15", Type: "STRING"}, {Name: "f16", Type: "STRING"}, {Name: "f17", Type: "STRING"}, }, }, }, },}FWIW,使用此库的其他调用都可以正常工作,因此我排除了oauth问题,等等。
- 2 回答
- 0 关注
- 217 浏览
添加回答
举报
0/150
提交
取消