我正在使用OutSystems连接到Google BigQuery API。 我能够查询数据,当我仅发送选择查询时,响应成功。
当我尝试将查询追加到表时,我使用了稍有不同的请求正文,并且不断收到以下错误;
HTTP/1.1 400 BadRequest
Content-Type: application/json; charset=UTF-8
Vary: X-Origin,Origin,Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Alt-Svc: quic=":443"; ma=2592000; v="44,43,39,35"
Transfer-Encoding: chunked
Accept-Ranges: none
Cache-Control: private, max-age=0
Date: Tue, 28 Aug 2018 10:07:22 GMT
Expires: Tue, 28 Aug 2018 10:07:22 GMT
Server: GSE
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Required parameter is missing"
}
],
"code": 400,
"message": "Required parameter is missing"
}
}
我的要求是;
{
"configuration" : {
"query" : {
"query" : "SELECT * FROM Dataset.Table1 WHERE 1 = 1",
"createDisposition" : "CREATE_IF_NEEDED",
"destinationTable" : {
"datasetId" : "DatasetId",
"projectId" : "projectId",
"tableId" : "table2Id"
},
"useLegacySql" : false,
"writeDispostion" : "WRITE_APPEND"
}
}
}
我正在使用以下URL发送请求; https://www.googleapis.com/bigquery/v2/projects/ {项目} /查询
我想念什么?在Google API文档中找不到它。
答案 0 :(得分:1)
您使用的是writeDispostion
而不是writeDisposition
,此外,您可以检查this documentation中的[Required]
属性名称。