Wednesday 13 July 2022

HIVE: describe formatted table_name: Get detailed information about the table

Syntax

describe formatted table_name

 

Above statement print the detailed and storage information of a table.

hive> describe formatted employee;
OK
# col_name              data_type             comment             
id                    int                                       
name                  string                                    
hobbies               array<string>                             
technology_experience map<string,string>                        
gender_age            struct<gender:string,age:int>                     
     
# Detailed Table Information     
Database:             default                
OwnerType:            USER                   
Owner:                krishna                
CreateTime:           Fri Jan 15 14:00:58 IST 2021   
LastAccessTime:       UNKNOWN                
Retention:            0                      
Location:             hdfs://localhost:9000/user/hive/warehouse/employee   
Table Type:           MANAGED_TABLE          
Table Parameters:    
  COLUMN_STATS_ACCURATE {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"gender_age\":\"true\",\"hobbies\":\"true\",\"id\":\"true\",\"name\":\"true\",\"technology_experience\":\"true\"}}
  bucketing_version     2                   
  numFiles              0                   
  numRows               0                   
  rawDataSize           0                   
  totalSize             0                   
  transient_lastDdlTime 1610699458          
     
# Storage Information    
SerDe Library:        org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe   
InputFormat:          org.apache.hadoop.mapred.TextInputFormat   
OutputFormat:         org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat   
Compressed:           No                     
Num Buckets:          -1                     
Bucket Columns:       []                     
Sort Columns:         []                     
Storage Desc Params:     
  collection.delim      ,                   
  field.delim           |                   
  mapkey.delim          :                   
  serialization.format  |                   
Time taken: 0.121 seconds, Fetched: 38 row(s)

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment