Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how can we verify wheather a table is tempory or not using hive command/terminal/hue

avatar
Contributor

Dear all.

 

I created one hive temp tables as below -

but how can we identified that tables is temp tables or not.

 

 

 

CREATE temporary TABLE IF NOT EXISTS employee ( eid int, name String,
salary String, destination String)
COMMENT ‘Employee details’
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ‘\t’
LINES TERMINATED BY ‘\n’
STORED AS TEXTFILE;

 

 

i used below command to described but not getting any info-

 

 

describe formatted employee;
col_name 	data_type 	comment
1	# col_name            	data_type           	comment             
2		NULL	NULL
3	eid	int	
4	name	string	
5	salary	string	
6	destination	string	
7		NULL	NULL
8	# Detailed Table Information	NULL	NULL
9	Database:           	h7                  	NULL
10	OwnerType:          	USER                	NULL
11	Owner:              	****            	NULL
12	CreateTime:         	Tue Mar 03 08:50:28 EST 2020	NULL
13	LastAccessTime:     	UNKNOWN             	NULL
14	Retention:          	0                   	NULL
15	Location:           	hdfs:***********	NULL
16	Table Type:         	MANAGED_TABLE       	NULL
17	Table Parameters:	NULL	NULL
18		comment             	Employee details    
19		NULL	NULL
20	# Storage Information	NULL	NULL
21	SerDe Library:      	org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe	NULL
22	InputFormat:        	org.apache.hadoop.mapred.TextInputFormat	NULL
23	OutputFormat:       	org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat	NULL
24	Compressed:         	No                  	NULL
25	Num Buckets:        	-1                  	NULL
26	Bucket Columns:     	[]                  	NULL
27	Sort Columns:       	[]                  	NULL
28	Storage Desc Params:	NULL	NULL
29		field.delim         	\t                  
30		line.delim          	\n                  

 

 

Thanks

HadoopHelp

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Hi @HadoopHelp 

 

Try:

 

describe extended employee;

 

If you use the extended keyword you should get some detailed table information out that includes the following flag:

 

temporary:true

 

Regards,

Steve

View solution in original post

1 REPLY 1

avatar
Super Collaborator

Hi @HadoopHelp 

 

Try:

 

describe extended employee;

 

If you use the extended keyword you should get some detailed table information out that includes the following flag:

 

temporary:true

 

Regards,

Steve