ITPub博客

首页 > 大数据 > Hadoop > Hive格式化输出数据库和表详细信息

Hive格式化输出数据库和表详细信息

原创 Hadoop 作者:长河BI 时间:2015-06-21 16:45:04 0 删除 编辑
hive (test)> desc database extended wx_test; 
OK
db_name     comment                 location                                                               
wx_test                                  hdfs://master.cloudera.com:8020/user/hive/warehouse/wx_test.db    

owner_name     owner_type     parameters
hadoop          USER             {t_date=2015-06-21, creator=wx}
Time taken: 0.075 seconds, Fetched: 1 row(s)


hive (test)> desc formatted page_view_1;

OK
col_name data_type comment
# col_name             data_type           comment             
 
viewtime             int                                    
userid               bigint                                  
page_url             string                                  
referrer_url         string                                  
ip                   string               IP Address of the User
 
# Partition Information  
# col_name             data_type           comment             
 
dt                   string                                  
country             string                                  
 
# Detailed Table Information  
Database:           test                  
Owner:               hadoop                
CreateTime:         Sun Jun 21 16:37:49 CST 2015  
LastAccessTime:     UNKNOWN              
Protect Mode:       None                  
Retention:           0                    
Location:           hdfs://master.cloudera.com:8020/user/hive/warehouse/test.db/page_view_1  
Table Type:         MANAGED_TABLE        
Table Parameters:  
comment             This is the page view table
creator             wx                  
t_date               2015-06-21          
transient_lastDdlTime 1434875869          
 
# Storage Information  
SerDe Library:       org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe  
InputFormat:         org.apache.hadoop.mapred.SequenceFileInputFormat  
OutputFormat:       org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat  
Compressed:         No                    
Num Buckets:         -1                    
Bucket Columns:     []                    
Sort Columns:       []                    
Storage Desc Params:  
serialization.format 1                   
Time taken: 0.096 seconds, Fetched: 39 row(s)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29070860/viewspace-1706953/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Hadoop属性注释
下一篇: Spark2 线性回归
请登录后发表评论 登录
全部评论

注册时间:2015-06-16

  • 博文量
    15
  • 访问量
    89058