I dump a Hive table as follows
hive -e 'select * from sometable' | sed 's/[\t]/,/g' > /tmp/us.csv
I drop a destination table and create it again based on a model table.
drop table blargh; create table blargh like modeltable;
modeltable is partitioned on a field called mkt_cd so now blargh is too.
I run a script against /tmp/us.csv and modify the timestamp field, adjusting it to be now() in the format YYYY-mm-DD HH:MM:SS and I write out a file new.csv. The old CSV /tmp/us.csv had a timestamp in this format which was old and we needed to refresh it.
Finally I try to load with the new CSV file:
hive> load data inpath '/path/to/new/new.csv' into table blargh partition(mkt_cd);
FAILED: NullPointerException null
This error occurs even if I take the "head" (a few rows) of new.csv as my input. In the editor, it looks good and there are no empty lines. In addition, this error also occurs if I simply use the original CSV /tmp/us.csv file before I changed it. What could be a reason here?