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

相关推荐
Hello.Reader1 天前
Flink SQL 的 LOAD MODULE 深度实战——加载 Hive 模块、理解模块发现与常见坑
hive·sql·flink
泰克教育官方账号1 天前
泰涨知识 | Hadoop的IO操作——压缩/解压缩
大数据·hadoop·分布式
qq_381454992 天前
大数据时代的分布式基石Hadoop
hadoop
howard20052 天前
Hive实战任务 - 9.1 实现词频统计
hive·词频统计
满目山河•2 天前
二、复制三台虚拟机
hive·hadoop·hbase
howard20052 天前
Hive实战任务 - 9.3 实现学生信息排序和统计
hive·排序·汇总·学生信息
番茄撒旦在上2 天前
什么样的表适合做拉链表
大数据·数据仓库·hive
howard20052 天前
Hive实战任务 - 9.5 实现网址去重
hive·网址去重
howard20052 天前
Hive实战任务 - 9.4 分科汇总求月考平均分
hive·分科汇总月考平均分
howard20052 天前
Hive实战任务 - 9.2 统计总分与平均分
hive·统计总分与平均分