NoSQL/Hive

hive partition 신규 파티션 자동인식

세모데 2017. 3. 9. 21:46

hive partition 테이블에 신규 파티션 추가후 자동으로 인식하기 위해서


1. 디렉토리 포맷을 아래와 같이 구성


/tmp/test/pt=20170309/


형식 : partition 이름 => pt     partition value => 20170309


create external table test

(

     id string

)

partitioned by (pt string)

row format delimited fields terminated  by ","

location '/tmp/test'



2.  auto 인식 


msck repair table test