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]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

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