我想更新所有分区中列的值。在我发现insert overwrite之前可以用来更新数据。我目前的陈述是
插入OVERWRITE表s_job PARTITION(pt =‘20190101’)选择…
使用动态分区:
set hive.exec.dynamic.partition=true; set hive.exec.dynamic.partition.mode=nonstrict; insert OVERWRITE table s_job PARTITION(pt) select --Add all columns in their original order col1, col2, ... coln, case job_name when 'Job' then 'system' end as job_name, pt --partition column should be the last one from s_job;
您可以使用 动态分区 对于这种类型的任务