A temporary table in Apache Hive, as the name indicates, is a table that works like a regular table but exists only temporarily in Hive’s temp space. It will remain till the user’s session expires. They are most often used to save interim results from batch processing that do not need to be saved permanently.
Example:
CREATE TEMPORARY TABLE tempEmp(empno INT, ename STRING, sal DOUBLE);
Looking at the above image, you can see that the temporary table is stored at /tmp/hive/user/* rather than the default Hive warehouse directory.
I hope you found this post useful. Please click the follow button to receive notifications of new postings.
One comment