zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    bzoj 4583 购物
    hdu 4694 支配树
    弦图问题初步
    第一次省选总结
    初学kd树
    省选前集训 lca
    bzoj 3282 Tree
    bzoj 2157 旅游
    二分图匹配(匈牙利算法模板)
    最大流(模板)
  • 原文地址:https://www.cnblogs.com/buoge/p/8707318.html
Copyright © 2011-2022 走看看