2016-12-16 89 views
0

https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/insertAll引用谷歌大量查询插入API返回200,但不插入数据

谷歌大量查询API将返回200然而,数据不被插入在表中;

请求

POST https://www.googleapis.com/bigquery/v2/projects/***/datasets/***/tables/visits/insertAll?fields=insertErrors%2Ckind&key={YOUR_API_KEY} 

{ 
"rows": [ 
    { 
    "json": { 
    "hostId": "Value A", 
    "statusCode": "Value B" 
    } 
    }, 
    { 
    "insertId": "inser-id-yo", 
    "json": { 
    "hostId": "Value A", 
    "statusCode": "Value B" 
    } 
} 
] 
} 

响应然而

Response: 200 
cache-control: no-cache, no-store, max-age=0, must-revalidate 
content-encoding: gzip 
content-length: 69 
content-type: application/json; charset=UTF-8 
date: Fri, 16 Dec 2016 12:00:16 GMT 
etag: "wWvNncJfeAdSHVaIWRpICxBS7AM/vyGp6PvFo4RvsFtPoIWeCReyIC8" 
expires: Mon, 01 Jan 1990 00:00:00 GMT 
pragma: no-cache 
server: GSE 
vary: Origin, X-Origin 

{ 
"kind": "bigquery#tableDataInsertAllResponse" 
} 

我的BigQuery资料表是空的,没有数据被插入。

我知道那里有一些SDK,但是我需要能够通过Curl来做到这一点,因为我正在使用Google尚未开发的语言和SDK。

+0

如果数据是在表中你是如何检查?请注意,流式插入可能需要长达90分钟才能用于复制和导出操作(https://cloud.google.com/bigquery/streaming-data-into-bigquery),因此如果您要导出表格有可能会有延迟。 –

+0

谢谢@VictorMota –

回答

1

任何其他谁有这个问题,因为BigQuery可以有长达两个小时的延迟。