hive,查询hive表总条数

在mysql元数据库中查询hive表总条数

select sum(param_value)
from TBLS t   
left join DBS d  
on t.DB_ID = d.DB_ID  
left join TABLE_PARAMS tb 
on t.TBL_ID = tb.TBL_ID   
where d.NAME = 'ods' and tb.PARAM_KEY='numRows' and t.TBL_NAME like "ods_%"; 

d.name 库名

t.tbl_name 表名

 

posted @ 2024-11-11 17:36  所向披靡zz  阅读(152)  评论(0)    收藏  举报