首页 > 其他 > 详细

hive查询分区元数据,PARTITIONED BY

时间:2020-11-01 09:56:04      阅读:262      评论:0      收藏:0      [点我收藏+]
-- 查询具体表的分区目录 
select t1.NAME, t2.TBL_NAME,t4.PART_NAME, t3.LOCATION from DBS t1, TBLS t2 , SDS t3 ,PARTITIONSt4 
where t1.DB_ID=t2.DB_ID and t4.SD_ID = t3.SD_ID AND t2.TBL_ID = t4.TBL_ID and t1.NAME` = 数据库名 AND
t2.TBL_NAME like 表名

UNION

-- 查询具体表的目录
select t1.NAME, t2.TBL_NAME,null, t3.LOCATION from DBS t1, TBLS t2 , SDS t3
where t1.DB_ID=t2.DB_ID and
t2.SD_ID = t3.SD_ID AND
t1.NAME = 数据库名 AND
t2.TBL_NAME like 数据库名 ;`

 

hive查询分区元数据,PARTITIONED BY

原文:https://www.cnblogs.com/yangms/p/13908553.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!