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

Hive is not generating unique file names when using INSERT INTO SELECT

New Contributor

I've an external table (tbl_external) pointing to s3 location

I am trying to insert data into external table using another table (tbl_test) which is not an external table

insert into tbl_external select * from tbl_test;

But hive is always generating a file with same file name (000000_0) when i run the above insert statement, due to this the file is getting overwritten and the s3 location will always have single file instead of multiple files when i run the insert statements multiple times How to make hive generate different file names for ex : (000000_0_copy_1, 000000_0_copy_2 etc ..)

2 REPLIES 2

Cloudera Employee

This may be related to HIVE-15199. Please check the Apache Jira https://issues.apache.org/jira/browse/HIVE-15199

New Contributor

We dont have this problem in our dev environment, we are facing the problem only in prod

Dev Hive version is 1.2.1.2.3.6.0-3796

Prod Hive version is 1.2.1000.2.5.3.0-37

; ;