Support Questions
Find answers, ask questions, and share your expertise

LOAD DATA INPATH doesnt work without "overwrite"

I'm using the following command and it errors. but I can see the file has been deleted from /tmp/hive_files/ and I can see the file under /apps/hive/dev.db/tmp_fx_amssubscriberlog4. but when I do a select count(*) from the table it retuns 0.

LOAD DATA INPATH '/tmp/hive_files/20170925190153_fx_amssubscriberlog1.csv'  INTO TABLE dev.tmp_fx_amssubscriberlog4;

error:

java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

but if I use the following command and its fine

LOAD DATA INPATH '/tmp/hive_files/20170925190153_fx_amssubscriberlog1.csv' OVERWRITE INTO TABLE dev.tmp_fx_amssubscriberlog4;