查看Hive表的描述信息,包括在HDFS上的Location信息

/hive/bin/beeline

beeline> !connect jdbc:hive2://ip:10000

输入用户名

输入密码

DESCRIBE FORMATTED 表名;

下面的例子

No rows affected (0.820 seconds)

0: jdbc:hive2://ip:10000> DESCRIBE FORMATTED demo;

INFO : Compiling command(queryId=root_20240601141007_207d8432-0f88-4690-96e1-e9c9ee766b31): DESCRIBE FORMATTED demo

INFO : Semantic Analysis Completed (retrial = false)

INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:col_name, type:string, comment:from deserializer), FieldSchema(name:data_type, type:string, comment:from deserializer), FieldSchema(name:comment, type:string, comment:from deserializer)], properties:null)

INFO : Completed compiling command(queryId=root_20240601141007_207d8432-0f88-4690-96e1-e9c9ee766b31); Time taken: 0.106 seconds

INFO : Executing command(queryId=root_20240601141007_207d8432-0f88-4690-96e1-e9c9ee766b31): DESCRIBE FORMATTED demo

INFO : Starting task [Stage-0:DDL] in serial mode

INFO : Completed executing command(queryId=root_20240601141007_207d8432-0f88-4690-96e1-e9c9ee766b31); Time taken: 0.25 seconds

INFO : OK

+-------------------------------+----------------------------------------------------+----------------------------------------------------+

| col_name | data_type | comment |

+-------------------------------+----------------------------------------------------+----------------------------------------------------+

| # col_name | data_type | comment |

| id | string | ?? |

| name | string | ???? |

| | NULL | NULL |

| # Detailed Table Information | NULL | NULL |

| Database: | default | NULL |

| OwnerType: | USER | NULL |

| Owner: | root | NULL |

| CreateTime: | Sat Jun 01 14:08:32 CST 2024 | NULL |

| LastAccessTime: | UNKNOWN | NULL |

| Retention: | 0 | NULL |

| Location: | hdfs://ip:9000/hive/warehouse/warn | NULL |

| Table Type: | MANAGED_TABLE | NULL |

| Table Parameters: | NULL | NULL |

| | COLUMN_STATS_ACCURATE | {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{}} |

| | bucketing_version | 2 |

| | comment | ??? |

| | numFiles | 0 |

| | numRows | 0 |

| | rawDataSize | 0 |

| | totalSize | 0 |

| | transient_lastDdlTime | 1717222112 |

| | NULL | NULL |

| # Storage Information | NULL | NULL |

| SerDe Library: | org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe | NULL |

| InputFormat: | org.apache.hadoop.mapred.TextInputFormat | NULL |

| OutputFormat: | org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat | NULL |

| Compressed: | No | NULL |

| Num Buckets: | -1 | NULL |

| Bucket Columns: | [] | NULL |

| Sort Columns: | [] | NULL |

| Storage Desc Params: | NULL | NULL |

| | field.delim | \t |

| | serialization.format | \t |

+-------------------------------+----------------------------------------------------+----------------------------------------------------+

45 rows selected (0.417 seconds)

相关推荐
时差9532 小时前
【面试题】Hive 查询:如何查找用户连续三天登录的记录
大数据·数据库·hive·sql·面试·database
苍老流年2 小时前
Hive中各种Join的实现
数据仓库·hive·hadoop
静听山水2 小时前
Hive:UDTF 函数
hive
EDG Zmjjkk3 小时前
Hive 查询(详细实操版)
数据仓库·hive·hadoop
lzhlizihang4 小时前
【Hive sql 面试题】求出各类型专利top 10申请人,以及对应的专利申请数(难)
大数据·hive·sql·面试题
Hsu_kk4 小时前
Hive 查询各类型专利 Top 10 申请人及对应的专利申请数
数据仓库·hive·hadoop
静听山水4 小时前
Hive 的数据存储单元结构
hive
大数据编程之光4 小时前
Hive 查询各类型专利 top10 申请人及专利申请数
大数据·数据仓库·hive·hadoop
杰克逊的日记5 小时前
Hive详解
数据仓库·hive·hadoop
上辈子杀猪这辈子学IT5 小时前
【Zookeeper集群搭建】安装zookeeper、zookeeper集群配置、zookeeper启动与关闭、zookeeper的shell命令操作
linux·hadoop·zookeeper·centos·debian