Hive temporary table auto deletion
Steps for Temporary Hive table:
I have checked that there is no such table (not temporary) already exists.
hive -e 'use myschema; show tables "tmp";'
--no rows returned
Then I run :
$hive -e 'use myschema; create temporary table tmp (id int);'
OK
Check there is no table:
hive -e 'use myschema; show tables "tmp";'
--no rows returned - it works correctly
Create not temporary table:
hive -e 'use myschema; create table tmp (id int);'
--ok
Now there is persistent table:
hive -e 'use myschema; show tables "tmp";'
OK
tmp
Time taken: 0.081 seconds, Fetched: 1 row(s)
Try to create the same temporary table:
hive -e 'use myschema; create temporary table tmp (id int);'
OK
Persistent table remains in the schema. Temporary table was dropped successfully and temporary table was isolated inside session, not visible to other sessions.
Steps for Temporary Hive table:
I have checked that there is no such table (not temporary) already exists.
hive -e 'use myschema; show tables "tmp";'
--no rows returned
Then I run :
$hive -e 'use myschema; create temporary table tmp (id int);'
OK
Check there is no table:
hive -e 'use myschema; show tables "tmp";'
--no rows returned - it works correctly
Create not temporary table:
hive -e 'use myschema; create table tmp (id int);'
--ok
Now there is persistent table:
hive -e 'use myschema; show tables "tmp";'
OK
tmp
Time taken: 0.081 seconds, Fetched: 1 row(s)
Try to create the same temporary table:
hive -e 'use myschema; create temporary table tmp (id int);'
OK
Persistent table remains in the schema. Temporary table was dropped successfully and temporary table was isolated inside session, not visible to other sessions.
Comments
Post a Comment