/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)