Hadoop 如何在配置单元中更新分区表中的某些行?

Hadoop 如何在配置单元中更新分区表中的某些行?,hadoop,hive,bigdata,hiveql,Hadoop,Hive,Bigdata,Hiveql,我需要按日期更新分区表中的某些行,这些行包含一系列日期,但我不知道如何更新?使用动态分区,您可以覆盖更新所需的分区。使用用例语句检查要修改的行并设置值,如此模板中所示: set hive.exec.dynamic.partition=true; set hive.exec.dynamic.partition.mode=nonstrict; insert overwrite table table_name partition (partition_column) select col1,

我需要按日期更新分区表中的某些行,这些行包含一系列日期,但我不知道如何更新?

使用动态分区,您可以覆盖更新所需的分区。使用用例语句检查要修改的行并设置值,如此模板中所示:

set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;

insert overwrite table table_name partition (partition_column)

select col1, 
       col2,
       case when col1='record to be updated' then 'new value' else col3 end as col3,
       ...
       colN,
       partition_column --partition_column should be the last
from table_name 
where ...--partition predicate here

您好,您与表格关联的文件类型是什么:avro、拼花地板、orc?如何识别这些行?