2017-02-08 34 views
0

我试图通过一个java应用程序使用“in unnest()”子句来使用BigQuery客户端,我在其中设置了参数类型命名参数为数组类型,因为在此子句中将发送值列表。但我得到的错误响应:BigQuery-无法在“unnest(@)”子句中设置值

{ 
    "code" : 400, 
    "errors" : [ { 
    "domain" : "global", 
    "message" : "Invalid query parameter type", 
    "reason" : "invalid" 
    } ], 
    "message" : "Invalid query parameter type" 
} 

我得到了同样的错误,当我尝试使用REST API,将参数类型设置为

"parameterType": { 
     "arrayType": { 
      "type": "STRING" 
} 

如何UNNEST设置多个值”(@myparam) “条款?

回答

1

the documentation它应该是:

"parameterType": { 
    "type": "ARRAY", 
    "arrayType": { 
    "type": "STRING" 
    } 
} 

具体而言,您还需要提供ARRAY类型。