Drop Hive раздел динамически - PullRequest
0 голосов
/ 09 марта 2020

Я пытаюсь удалить раздел в улье, используя вычисленную дату, но это не работает.

эти работы:

alter table test.retail_invitation_txt drop if exists partition (process_dt<'2020-01-01')

alter table test.retail_invitation_txt drop if exists partition (process_dt='2020-01-01')

alter table test.retail_invitation_txt drop if exists partition (process_dt=current_date)

, но они не будут работать:

set hivevar:date1=date_sub(current_date , 100);
alter table table drop if exists partition (process_dt ='${hiveconf:date1}');

alter table table drop if exists partition (process_dt =${date_sub(current_date , 100)});

alter table table drop if exists partition (process_dt ='${date_sub(current_date , 100)}');

Помощь очень ценится

...