There is a HIVE table with around 100 columns, partitioned by columns ClientNumber and Date.
I am trying to insert data from another HIVE table into only 30 columns as well as create Date
partitions dynamically.
The issue is that all data gets loaded into "ClientNumber=123/date=__HIVE_DEFAULT_PARTITION__" partition which is not quite expected.
The script looks like this:
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
FROM DBName.Table2
INSERT INTO TABLE DBName.Table1
PARTITION(ClientNumber=123, `Date`)
(col1, col2, ..., col29, `Date`)
SELECT
col1, col2, ..., col29, eventDate as `Date`
Date
values retrieved by the query are all correct, no NULL or other uncharacteristic values.
Removing or adding Dynamic partitioning parameters makes no difference.
Providing specific Date
value (instead of dynamic query-populated value) results in creation of correct partitions.
Is there any trick I am missing or some issue with populating specific number of columns in partitioned tables?
P.S. Is listing all other columns (col31 - col100) in import script as NULL worth considering?