Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Hive: Temporary table created automatically

avatar
Expert Contributor

For Hive table of type TEXTFILE, a temporary table gets automatically created like below (for each table that we create), at the time when you try to do an INSERT. Can you please advise if this is an expected behavior and the temp table should be left untouched?

values__tmp__table__1

values__tmp__table__2

values__tmp__table__3

.

.

1 ACCEPTED SOLUTION

avatar
Guru

Temp tables like these are created when hive needs to manage intermediate data during an operation. This is normal. They should automatically delete when the operation is over. See these links for more:

If this is what you are looking for, let me know by accepting the answer; else, let me know of any gaps or followup questions.

View solution in original post

3 REPLIES 3

avatar
Guru

Temp tables like these are created when hive needs to manage intermediate data during an operation. This is normal. They should automatically delete when the operation is over. See these links for more:

If this is what you are looking for, let me know by accepting the answer; else, let me know of any gaps or followup questions.

avatar
Expert Contributor

I noticed that those tables were present until I stayed within the hive session. After disconnecting and re-establishing the hive session, I didn't find those tables.

Note:

The above links seems to correspond to user creating temporary table with syntax "CREATE TEMPORARY TABLE". However, my inquiry was related to the tables created automatically by Hive.

avatar
Super Collaborator

These tables are created by insert statement using VALUES clause - it's part of internal implementation logic. They are temp tables and are session scoped and as you've noticed will go away when the session ends.