0

How to get view count of rows from metadata.

Joining TABLE_PARAMS on TBLS:

SELECT * FROM 
hive.TABLE_PARAMS tb JOIN 
hive.TBLS t 
ON t.TBL_ID = tb.TBL_ID
WHERE tb.PARAM_KEY = 'numRows' AND 
t.TBL_NAME like 'view_%'

doesn't work as view is not a table.

  • describe extended view_name; – nobody Aug 24 '18 at 15:17
  • I need for all the views. I can make a list of all views and run loop with SELECT COUNT(*) FROM $TBL_NAME where $TBL_NAME is variable, but looking for some solution which might already exists in metadata as it exists for tables. – Julius Rachmanas Aug 24 '18 at 15:42

0 Answers0