hive修改字段名后数据丢失

1. 内部表Parquet测试

CREATE TABLE `test.user_active_all_parquet_inner`(
`imp_date` date COMMENT '活跃日期', 
`user_id` string COMMENT '用户id')
COMMENT '用户每日活跃列表'
PARTITIONED BY (`dt` string)
stored as parquet

hive.exec.dynamic.partition.mode=nonstric;
insert into user_active_all_parquet_inner partition(dt) select * from user_active_all;
alter table user_active_all_parquet_inner change column `imp_date` `data_date` date cascade;

select * from user_active_all_parquet_inner limit 50;

结果出现数据丢失

hive修改字段名后数据丢失_第1张图片

查找元数据:

  1. select * from

你可能感兴趣的:(Hive)