查看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)

相关推荐
赤土 炙焱13 小时前
hiveserver2启动失败,磁盘满了
hive·hadoop
Francek Chen1 天前
【大数据处理与分析】数据仓库Hive:02 数据湖
大数据·数据仓库·hive·hadoop·分布式·数据分析
Blossom i3 天前
Python+spark2.0+Hadoop机器学习与大数据实战第十一章:Python Spark的集成开发环境
大数据·hadoop·spark
我要用代码向我喜欢的女孩表白4 天前
hdfs获取所有路径大小的脚本
大数据·hadoop·hdfs
Waay4 天前
什么是HBase?它和Hive有什么区别?
大数据·数据库·hive·hadoop·hdfs·hbase
fastjson_5 天前
Hadoop之Yarn
大数据·hadoop·npm
fastjson_5 天前
Hive的介绍和使用
数据仓库·hive·hadoop
光电的一只菜鸡7 天前
小白从零开始学agent(二)——如何高效编写 Prompt 与 Skill
hadoop·microsoft·prompt
William Dawson10 天前
【踩坑实录|Hive1\.2\.1数据服务接口5大疑难问题调试与全方位优化方案】
java·hive·spring boot
ha_lydms10 天前
Hologres 简介
大数据·hadoop·阿里云·mapreduce·yarn·dataworks·hologres