Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

is there a way in hive to list all the table locations along with the partition location.

New Contributor
 
1 ACCEPTED SOLUTION

if you are using mysql database as metastore then you can use following query to get partition locations directly from metastore.

select TBLS.TBL_NAME,PARTITIONS.PART_NAME,SDS.LOCATIONfrom SDS,TBLS,PARTITIONSwhere PARTITIONS.SD_ID = SDS.SD_IDand TBLS.TBL_ID=PARTITIONS.TBL_IDorder by 1,2;

View solution in original post

1 REPLY 1

if you are using mysql database as metastore then you can use following query to get partition locations directly from metastore.

select TBLS.TBL_NAME,PARTITIONS.PART_NAME,SDS.LOCATIONfrom SDS,TBLS,PARTITIONSwhere PARTITIONS.SD_ID = SDS.SD_IDand TBLS.TBL_ID=PARTITIONS.TBL_IDorder by 1,2;
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.