Describe Database

hive> DESCRIBE DATABASE test;
test ??? hdfs://ns1/user/hive/warehouse/test.db wx USER
hive> DESCRIBE DATABASE EXTENDED test;
test ??? hdfs://ns1/user/hive/warehouse/test.db wx USER {date=2015-07-18, creator=wx}

Describe Table/View/Column

hive> DESCRIBE  user_info_bucketed;

user_id                 bigint

firstname               string

lastname                string

ds                      string

# Partition Information

# col_name              data_type               comment

ds                      string

hive> DESCRIBE FORMATTED user_info_bucketed.firstname

hive> DESCRIBE FORMATTED user_info_bucketed firstname;

# col_name              data_type               min                     max                     num_nulls               distinct_count          avg_col_len           max_col_len              num_trues               num_falses              comment

firstname               string                                                                                                                                                                                                                   from deserializer

hive> DESCRIBE EXTENDED user_info_bucketed.firstname;
firstname               string                  from deserializer

hive> DESCRIBE FORMATTED user_info_bucketed;

# col_name              data_type               comment

user_id                 bigint

firstname               string

lastname                string

# Partition Information

# col_name              data_type               comment

ds                      string

# Detailed Table Information

Database:               test

Owner:                  huai

CreateTime:             Sat Jul 25 10:56:50 CST 2015

LastAccessTime:         UNKNOWN

Protect Mode:           None

Retention:              0

Location:               hdfs://ns1/user/hive/warehouse/test.db/user_info_bucketed

Table Type:             MANAGED_TABLE

Table Parameters:

comment                 A bucketed copy of user_info

transient_lastDdlTime   1437793010

# 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:            3

Bucket Columns:         [user_id]

Sort Columns:           [Order(col:firstname, order:1)]

Storage Desc Params:

serialization.format    1

hive> DESCRIBE EXTENDED user_info_bucketed;

user_id                 bigint

firstname               string

lastname                string

ds                      string

# Partition Information

# col_name              data_type               comment

ds                      string

Detailed Table Information      Table(tableName:user_info_bucketed, dbName:test, owner:huai, createTime:1437793010, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:user_id, type:bigint, comment:null), FieldSchema(name:firstname, type:string, comment:null), FieldSchema(name:lastname, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:hdfs://ns1/user/hive/warehouse/test.db/user_info_bucketed, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:3, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[user_id], sortCols:[Order(col:firstname, order:1)], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), storedAsSubDirectories:false), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{transient_lastDdlTime=1437793010, comment=A bucketed copy of user_info}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)

Describe Partition

hive> DESCRIBE FORMATTED user_info_bucketed PARTITION (ds='2015-07-25');

# col_name              data_type               comment

user_id                 bigint

firstname               string

lastname                string

# Partition Information

# col_name              data_type               comment

ds                      string

# Detailed Partition Information

Partition Value:        [2015-07-25]

Database:               test

Table:                  user_info_bucketed

CreateTime:             Sat Jul 25 10:59:28 CST 2015

LastAccessTime:         UNKNOWN

Protect Mode:           None

Location:               hdfs://ns1/user/hive/warehouse/test.db/user_info_bucketed/ds=2015-07-25

Partition Parameters:

COLUMN_STATS_ACCURATE   true

numFiles                3

numRows                 4

rawDataSize             68

totalSize               72

transient_lastDdlTime   1437793168

# 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:            3

Bucket Columns:         [user_id]

Sort Columns:           [Order(col:firstname, order:1)]

Storage Desc Params:

serialization.format    1

Hive desc的更多相关文章

  1. 附录C 编译安装Hive

    如果需要直接安装Hive,可以跳过编译步骤,从Hive的官网下载编译好的安装包,下载地址为http://hive.apache.org/downloads.html . C.1  编译Hive C.1 ...

  2. Hive基本语法操练

    建表规则如下: CREATE [EXTERNAL] TABLE [IF NOT EXISTS] table_name [(col_name data_type [COMMENT col_comment ...

  3. Spark入门实战系列--5.Hive(上)--Hive介绍及部署

    [注]该系列文章以及使用到安装包/测试数据 可以在<倾情大奉送--Spark入门实战系列>获取 .Hive介绍 1.1 Hive介绍 月开源的一个数据仓库框架,提供了类似于SQL语法的HQ ...

  4. Hive介绍、安装(转)

    1.Hive介绍 1.1 Hive介绍 Hive是一个基于Hadoop的开源数据仓库工具,用于存储和处理海量结构化数据.它是Facebook 2008年8月开源的一个数据仓库框架,提供了类似于SQL语 ...

  5. Sqoop_ 从 hive 导到mysql常遇九问题总结(转)

    以前以为版本不同,遇到的问题就不同,后来发现,无论是新版本,还是老版本,遇到的问题大部分都是相同的.下面解决问题的方法仅供借鉴 1.拒绝连接的错误表现是什么?2.表不存在该如何解决?3.null字段填 ...

  6. hive学习3(hive基本操作)

    hive基本操作 hive的数据类型 1)基本数据类型 TINYINT,SMALLINT,INT,BIGINT FLOAT/DOUBLE BOOLEAN STRING 2)复合类型 ARRAY:一组有 ...

  7. HIVE: Map Join Vs Common Join, and SMB

    HIVE  Map Join is nothing but the extended version of Hash Join of SQL Server - just extending Hash ...

  8. Hadoop第9周练习—Hive部署测试(含MySql部署)

    1.1 2 :搭建Hive环境 内容 2.2 3  运行环境说明 1.1  硬软件环境 线程,主频2.2G,6G内存 l  虚拟软件:VMware® Workstation 9.0.0 build-8 ...

  9. hive的常用命令

    #从hive中直接进入hdfs的daas/bstl/term/userinfo目录下 hive> !hadoop fs -ls /daas/bstl/term/userinfo; 查看hive表 ...

随机推荐

  1. Unity3D热更新LuaFramework入门实战

    http://blog.sina.com.cn/s/blog_6788cd880102w8qy.html http://www.manew.com/thread-91845-1-1.html http ...

  2. win8.1的ie11无法打开127.0.0.1和本机IP访问

    解决方法:把ie11安全选项里的启动保护模式对勾去掉!

  3. 解决计算机改名无法连接TFS的问题

    闲着没事改了下计算机名字,结果造成TFS无法连接. 报错讯息如下: ---------------------------Microsoft Visual Studio---------------- ...

  4. 什么是REST设计风格

    https://zh.wikipedia.org/wiki/REST http://www.infoq.com/cn/articles/rest-introduction

  5. linux下使用yum安装 mencached

    1. 安装 yum -y install memcached 2. 启动memcached ./usr/bin/memcached -d -m 256 -u root -p 11211 -c 1024 ...

  6. ios学习之UIWebView网页视图调整

    //先来一个可行的小Demo程序:结合searchBar的google搜索 #import <UIKit/UIKit.h> @interface ViewController : UIVi ...

  7. 线程同步 –AutoResetEvent和ManualResetEvent

    上一篇介绍了通过lock关键字和Monitor类型进行线程同步,本篇中就介绍一下通过同步句柄进行线程同步. 在Windows系统中,可以使用内核对象进行线程同步,内核对象由系统创建并维护.内核对象为内 ...

  8. MongoDB中的聚合操作

    根据MongoDB的文档描述,在MongoDB的聚合操作中,有以下五个聚合命令. 其中,count.distinct和group会提供很基本的功能,至于其他的高级聚合功能(sum.average.ma ...

  9. 【GIS】Cesium GLTF

    cd D:\GISSoft\3DsMax2017\COLLADA2GLTF-v2.1.4-windows-Release-x64 COLLADA2GLTF-bin.exe -f tree05.DAE ...

  10. N76E003之定时器3

    定时器3是一个16位自动重装载,向上计数定时器.用户可以通过配置T3PS[2:0] (T3CON[2:0])选择预分频,并写入重载值到R3H 和R3L寄存器来决定它的溢出速率.用户可以设置TR3 (T ...