Check if a hive table is partitioned on a given column
问题 I have a list of hive tables , of which some are partitioned. Given a column I need to check if a particular table is partitioned on that column or not. I have searched and found that desc formatted tablename would result in all the details of the table. Since I have to iterate over all the tables and get the list , desc formatted would not help. Is there any other way this can be done. 回答1: You can connect directly to metastore and query it: metastore=# select d."NAME" as DATABASE, t."TBL