Hive: how to show all partitions of a table?

Kevin Leo picture Kevin Leo · Mar 25, 2013 · Viewed 173.9k times · Source

I have a table with 1000+ partitions.

"Show partitions" command only lists a small number of partitions.

How can i show all partitions?

Update:

  1. I found "show partitions" command only lists exactly 500 partitions.

  2. "select ... where ..." only processes the 500 partitions!

Answer

www picture www · Mar 25, 2013

CLI has some limit when ouput is displayed. I suggest to export output into local file:

$hive -e 'show partitions table;' > partitions