You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by "caohui@donson.com.cn" <ca...@donson.com.cn> on 2016/03/31 04:43:07 UTC

run mapred task,can specify a user?

Hi,
i have some questions when using kylin,
q1:
when building cube, run mapred task, how can i specify a user, and assign cluster resources? What I need to modify the configuration files?
q2:
Query support fuzzy queries just like this "where col like 'ABC%'"
q3:
I have a string column,value like this "2016-02-01 21:56:08", how to get date value '2016-02-01', I've tried substr(requestdate,1,10) is not supported,or I need to modify the column type to date?
q4:
All fields can query, except Partition field,Whether does not support partition field queries?

Re: Re: run mapred task,can specify a user?

Posted by Li Yang <li...@apache.org>.
That is because "day" (and maybe "hour" too) is keyword in the SQL syntax.
You must quote them, like

select "DAY" from parquetlog

Note in quotes, the word is case sensitive.

Re: Re: run mapred task,can specify a user?

Posted by "caohui@donson.com.cn" <ca...@donson.com.cn>.
thanks,

For question 4, 
day and hour is the partition column,but I query failed






From: Li Yang
Date: 2016-03-31 17:42
To: user@kylin.apache.org
Subject: Re: run mapred task,can specify a user?
> q1: When building cube, run mapred task, how can i specify a user, and assign cluster resources? What I need to modify the configuration files?

Kylin use the same user who runs Kylin to launch MR jobs. You can modify conf/kylin_job_conf.xml to adjust any job parameters.


> q2: Query support fuzzy queries just like this "where col like 'ABC%'"


Yes


> q3: I have a string column,value like this "2016-02-01 21:56:08", how to get date value '2016-02-01', I've tried substr(requestdate,1,10) is not supported,or I need to modify the column type to date?


If the analysis only cares about date, it's highly recommended that the datetime is truncated to date before OLAP. The substring() syntax in Kylin is slightly different, see https://calcite.apache.org/docs/reference.html


> q4: All fields can query, except Partition field,Whether does not support partition field queries?


Don't understand. You can query partition column, that's for sure. Any example of something cannot query?





On Thu, Mar 31, 2016 at 10:43 AM, caohui@donson.com.cn <ca...@donson.com.cn> wrote:


Hi, 
i have some questions when using kylin,
q1:
when building cube, run mapred task, how can i specify a user, and assign cluster resources? What I need to modify the configuration files?
q2:
Query support fuzzy queries just like this "where col like 'ABC%'"
q3:
I have a string column,value like this "2016-02-01 21:56:08", how to get date value '2016-02-01', I've tried substr(requestdate,1,10) is not supported,or I need to modify the column type to date?
q4:
All fields can query, except Partition field,Whether does not support partition field queries?

Re: run mapred task,can specify a user?

Posted by Li Yang <li...@apache.org>.
> q1: When building cube, run mapred task, how can i specify a user, and
assign cluster resources? What I need to modify the configuration files?

Kylin use the same user who runs Kylin to launch MR jobs. You can modify
conf/kylin_job_conf.xml to adjust any job parameters.

> q2: Query support fuzzy queries just like this "where col like 'ABC%'"

Yes

> q3: I have a string column,value like this "2016-02-01 21:56:08", how to
get date value '2016-02-01', I've tried substr(requestdate,1,10) is not
supported,or I need to modify the column type to date?

If the analysis only cares about date, it's highly recommended that the
datetime is truncated to date before OLAP. The substring() syntax in Kylin
is slightly different, see https://calcite.apache.org/docs/reference.html

> q4: All fields can query, except Partition field,Whether does not support
partition field queries?

Don't understand. You can query partition column, that's for sure. Any
example of something cannot query?


On Thu, Mar 31, 2016 at 10:43 AM, caohui@donson.com.cn <caohui@donson.com.cn
> wrote:

>
> Hi,
> i have some questions when using kylin,
> q1:
> when building cube, run mapred task, how can i specify a user, and assign
> cluster resources? What I need to modify the configuration files?
> q2:
> Query support fuzzy queries just like this "where col like 'ABC%'"
> q3:
> I have a string column,value like this "2016-02-01 21:56:08", how to get
> date value '2016-02-01', I've tried substr(requestdate,1,10) is not
> supported,or I need to modify the column type to date?
> q4:
> All fields can query, except Partition field,Whether does not support
> partition field queries?
>