O'Reilly logo

Tera-Tom Genius Series - Hadoop Architecture and SQL by Jason Nolander, Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10 – Temporary Tables

“I cannot imagine any condition which would cause this ship to founder. Modern shipbuilding has gone beyond that.”

- E. I. Smith, Captain of the Titanic

There are two types of Temporary Tables

Derived Table

Exists only within a query

Materialized by a SELECT Statement inside a query

Space comes from the User’s Spool space

Deleted when the query ends

Temporary Tables

Hive automatically deletes all temporary tables at the end of theuser's session. Tables are stored in the user's scratch directory andnot in the Hive warehouse directory. Scratch acts as the datasandbox for a user, located by default in /tmp/hive-<username>.

The two types of Temporary tables are Derived and Temporary.

CREATING A Derived Table

The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required