why hive can‘t select data from hdfs when use partition? -


i use flume write data hdfs,path /hive/logs/dt=20151002.then,i use hive select data,but count of response 0.

here create table sql,create external table if not exists test (id string) partitioned (dt string) row format delimited fields terminated '\t' lines terminated '\n' stored textfile location '/hive/logs'

here select sql,select count(*) test

it seems not registering partition in hive meta-store. although partition present in hdfs path,hive won't know if not registered in meta store. register can following:

alter table test add partition (dt='20151002') location '/hive/logs/dt=20151002';


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

javascript - How to bind ViewModel Store to View? -

javascript - Solution fails to pass one test with large inputs? -