You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by siva kumar <si...@gmail.com> on 2014/10/09 12:00:59 UTC

skewed tables

hi folks,
               Im working on skewed tables but facing some problems while
it has to create seperate files. Here is my query.


create table t(key string,value int) row format delimited stored as
textfile;

      load data local inpath 'skew.txt' into table t;
 select * from t;
OK
siva    1
nivi    2
hari    3
ravi    4
hive> set hive.mapred.supports.subdirectories=true;
hive> set mapred.input.dir.recursive=true;
hive> create table t1(key string,value int) skewed by (value) on ('2')
stored as directories;
OK
 insert overwrite table t1 select * from t;

select * from t1;
OK
siva    1
nivi    2
hari    3
ravi    4

But only one file is created instead of seperate files. .

hadoop fs -ls /user/hive/warehouse/t1
Found 1 items
-rw-rw-rw-   3 23529 supergroup         28 2014-10-09 15:26*
/user/hive/warehouse/t1/000000_0*

Im using hive 0.10 version. Any suggestions as soon as possible?

Thanks and regards,
sivakumar.c