Source file getting deleted when using load data in hive


when data is imported to hive table from hdfs source file using " load data " command , after import the original file getting deleted… is this how hive load data command behaves ?..


When you use LOAD DATA INPATH command, the data gets MOVED (instead of copy) from data location to location that you specified while creating Hive table.You can simply create the table using the external keyword, which leaves the files in place, but creates the table definition in the hive metastore.