Good question; I searched this and this page has the answer:
https://stackoverflow.com/questions/18612248/how-to-escape-single-quotes-into-double-quotes-into-single-quotes

And I verified it works.

2016-11-29 8:04 GMT+08:00 翁林君 <[email protected]>:

> hi, I got an error when using the kylin RESTful API "POST
> /kylin/api/query", error message is shown as below. The problem seems
> related to“  ' ” in the where clause,I took another try to use escape, but
> still got an other error. Is this a bug on the api?
>
> curl -X POST -H "Authorization: Basic QURNSU46S1lMSU4=" -H "Content-Type:
> application/json" -d '{ "sql":"select GROUPID, COUNT(distinct USERID) as
> ActiveUserCount from MINUTE_LEVEL_MSG_COUNT where GROUPID='DS0000023' group
> by GROUPID", "limit":1, "project":"gemii_molap" }'
> http://54.223.132.104:7070/kylin/api/query
>
> {"url":"http://54.223.132.104:7070/kylin/api/query","exception":"Error
> while executing SQL \"select GROUPID, COUNT(distinct USERID) as
> ActiveUserCount from MINUTE_LEVEL_MSG_COUNT where GROUPID=DS0000023 group
> by GROUPID LIMIT 1\": From line 1, column 101 to line 1, column 109: Column
> 'DS0000023' not found in any table"}
>



-- 
Best regards,

Shaofeng Shi 史少锋

Reply via email to