hive - Modify partition column value -
can modify value of partitioned table, changing name of partition directory?
the table have has year , month partitions. values stored decimal partitions "2016.0" instead of "2016" , "3.0" instead of "3".
can rename directories , have values in partitions updated?
first rename directories:
hadoop fs -mv /dev/year=2016.0 /dev/year=2016 hadoop fs -mv /dev/year=2016/month=4.0 /dev/year=2016/month=4
let hive metastore know new location/partition:
alter table logs partition(year = 2014, month = 4) set location 'hdfs://dev/year=2016/month=4';
Comments
Post a Comment