Hive 查询元数据库获取某个分区的count数


=========查询分区的大小=========
select d.NAME,t.TBL_NAME,p.PART_NAME,prm.PARAM_KEY,prm.PARAM_VALUE
from TBLS t
left join DBS d on t.DB_ID = d.DB_ID
left join PARTITIONS p on t.TBL_ID = p.TBL_ID
left join PARTITION_PARAMS prm on p.PART_ID=prm.PART_ID
where d.NAME='novel'
and t.TBL_NAME='textfile_table'
and p.PART_NAME like 'event_day=20180402/event_hour=%'
and prm.PARAM_KEY = 'totalSize'; =========查询分区信息=========
select d.NAME,t.TBL_NAME,p.PART_NAME,p.PART_ID
from TBLS t
left join DBS d on t.DB_ID = d.DB_ID
left join PARTITIONS p on t.TBL_ID = p.TBL_ID
where d.NAME='novel'
and t.TBL_NAME='textfile_table'

  

参考并改进:https://blog.csdn.net/bdchome/article/details/46965335
上一篇:mono ios莫名其妙闪退的解决方法


下一篇:Windows Installer (MSI)知识学习