Reply
Explorer
Posts: 23
Registered: ‎02-22-2016
Accepted Solution

List hive tables based on storage format

Is it possible to list hive tables based on the storage format? We want to implement a standard format for tables; before that we want to list down existing tables based on storage and identify which are not in standard format

Posts: 1,903
Kudos: 435
Solutions: 307
Registered: ‎07-31-2013

Re: List hive tables based on storage format

There's no direct way to filter that out via a simple statement.

You can either use JDBC to fetch catalog data and iterate through the descriptors, or run iterative "DESCRIBE (FORMATTED|EXTENDED) <TABLENAME>" and grep out the Storage and Format related information.

If this is a one-off, you can also explore querying the underlying HMS DB, but do not make something persistently reliant on that as the schema is subject to change between releases.
Explorer
Posts: 23
Registered: ‎02-22-2016

Re: List hive tables based on storage format

Thx Harsh , i will explore