Data loaded on a daily basis. Need to create a partition with the date column.
Date |
---|
3/15/2021 8:02:32 AM |
12/21/2020 12:20:41 PM |
Data loaded on a daily basis. Need to create a partition with the date column.
Date |
---|
3/15/2021 8:02:32 AM |
12/21/2020 12:20:41 PM |
You need to convert the table into a partition to the table. Then change the loading sql so that it inserts into the table properly.
create table new_tab() partitioned by ( partition_dt string );
set hive.exec.dynamic.partition.mode=nonstrict;
insert into new_table partition(partition_dt )
select src.*, from_unixtime(unix_timestamp(dttm_column),'MM/dd/yyyy') as partition_dt from original_table src;
drop table original_table ;
alter table new_table rename to original_table ;