You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by 翁林君 <fi...@gmail.com> on 2016/11/29 00:04:09 UTC
problem on using kylin RESTful API "POST /kylin/api/query"
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"}
Re: problem on using kylin RESTful API "POST /kylin/api/query"
Posted by 翁林君 <fi...@gmail.com>.
Super! Thanks ShaoFeng.
Regards,
Linjun
2016-11-29 9:34 GMT+08:00 ShaoFeng Shi <sh...@apache.org>:
> 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 翁林君 <fi...@gmail.com>:
>
> > 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 史少锋
>
Re: problem on using kylin RESTful API "POST /kylin/api/query"
Posted by ShaoFeng Shi <sh...@apache.org>.
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 翁林君 <fi...@gmail.com>:
> 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 史少锋