Is there a way to show partitions on Cloudera impala?

interskh picture interskh · Aug 1, 2013 · Viewed 7.8k times · Source

Normally, I can do show partitions <table> in hive. But when it is a parquet table, hive does not understand it. I can go to hdfs and check the dir structure, but that is not ideal. Is there any better way to do that?

Answer

user1189851 picture user1189851 · Oct 23, 2014

I am using Impala 1.4.0 and I can see partitions. From the impala-shell give the command:

show partitions <mytablename>

I have something looking like this:

 +-------+-------+-----+-------+--------+---------+--------------+---------+
| year  | month | day | #Rows | #Files | Size    | Bytes Cached | Format  |
+-------+-------+-----+-------+--------+---------+--------------+---------+
| 2013  | 11    | 1   | -1    | 3      | 25.87MB | NOT CACHED   | PARQUET |
| 2013  | 11    | 2   | -1    | 3      | 24.84MB | NOT CACHED   | PARQUET |
| 2013  | 11    | 3   | -1    | 2      | 19.05MB | NOT CACHED   | PARQUET |
| 2013  | 11    | 4   | -1    | 3      | 23.63MB | NOT CACHED   | PARQUET |
| 2013  | 11    | 5   | -1    | 3      | 26.56MB | NOT CACHED   | PARQUET |

Alternatively you can go to your table in HDFS . They are normally seen in this path: /user/hivestore/warehouse/<mytablename> or

/user/hive/warehouse/<mytablename>