Explore Table Properties
In addition to the table structure, you can also explore the properties of a table using the DESCRIBE EXTENDED
command.
DESCRIBE EXTENDED sensor_data;
This command will provide more detailed information about the table, including its properties, such as the table type, input and output formats, location, and any other relevant metadata.
Example output:
hive> DESCRIBE EXTENDED sensor_data;
OK
sensor_id int
sensor_name string
reading double
dt string
## Partition Information
## col_name data_type comment
dt string
Detailed Table Information Table(tableName:sensor_data, dbName:martropolis, owner:hadoop, createTime:1711106250, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:sensor_id, type:int, comment:null), FieldSchema(name:sensor_name, type:string, comment:null), FieldSchema(name:reading, type:double, comment:null), FieldSchema(name:dt, type:string, comment:null)], location:hdfs://localhost:9000/user/hive/warehouse/martropolis.db/sensor_data, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), storedAsSubDirectories:false), partitionKeys:[FieldSchema(name:dt, type:string, comment:null)], parameters:{totalSize=49, numRows=2, rawDataSize=47, COLUMN_STATS_ACCURATE={\"BASIC_STATS\":\"true\"}, numFiles=1, numPartitions=1, transient_lastDdlTime=1711106250, bucketing_version=2}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE, rewriteEnabled:false, catName:hive, ownerType:USER)
Time taken: 0.367 seconds, Fetched: 10 row(s)