If I write a hive sql like
ALTER TABLE tbl_name ADD PARTITION (dt=20131023) LOCATION 'hdfs://path/to/tbl_name/dt=20131023;
How can I query this location about partition later? Because I found there is some data in location but I can’t query them, hive sql like
SELECT data FROM tbl_name where dt=20131023;
Advertisement
Answer
show table extended like 'tbl_name' partition (dt='20131023');
Show Tables/Partitions Extended
SHOW TABLE EXTENDEDwill list information for all tables matching the given regular expression. Users cannot use regular expression for table name if a partition specification is present. This command’s output includes basic table information and file system information liketotalNumberFiles,totalFileSize,maxFileSize,minFileSize,lastAccessTime, andlastUpdateTime. If partition is present, it will output the given partition’s file system information instead of table’s file system information.