Hi

in impala.

Here are my questions what the metric field being referred to in the

schema(which has Metric_key, metric_time and value) which filed the

partitioned column metric refers to.

Also how do you make you data partition aware do we have to do INSERT INTO

this new table from the original hive table that has data from HDFS copy

operation.

Also does 288 bucket means that all data will be divided into 288 partition

or so

CREATE TABLE TS_FACT(

Metric_key int,

metric_time int,

value STRING )

PARTITIONED BY (metric STRING)

CLUSTERED BY(metric_key) sorted by (metric_time) INTO 288 buckets

STORED AS SEQUENCEFILE;

select * from ts_fact where metric='traffin' and metric_time=1352985707

Metric_key int,

metric_time int,

value STRING )

PARTITIONED BY (metric STRING)

CLUSTERED BY(metric_key) sorted by (metric_time) INTO 288 buckets

STORED AS SEQUENCEFILE;

select * from ts_fact where metric='traffin' and metric_time=1352985707

union all select * from ts_fact where metric='traffout' and

metric_time=1352985707 union all select * from ts_fact where

metric='utilin' and metric_time=1352985707;

metric_time=1352985707 union all select * from ts_fact where

metric='utilin' and metric_time=1352985707;