Using the command:
describe formatted my_table partition my_partition
we are able to list the metadata including hdfs location of the partition my_partition
in my_table
. But how can we get an output with 2 columns:
Partition | Location
which would list all the partitions in my_table
and their hdfs locations?
Query the metastore.
Demo
Hive
Metastore (MySQL)