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 ..)


Cloudera Employee

This may be related to HIVE-15199. Please check the Apache Jira

New Contributor

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

Dev Hive version is

Prod Hive version is 1.2.1000.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.