You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Matt Goeke <go...@gmail.com> on 2012/12/10 18:17:37 UTC

Retrieve Hive partitions using Hive Server code

All,

Does anyone know how to use the underlying Hive Server code to request a
list of partitions based on a subset of known partition values? e.g. If I
know my table is partitioned by date / hour / UUID how can I retrieve all
partitions for for a specified date / hour?

The reason why I ask is if I use the default get_partition function in the
HiveMetaStore class I end up getting an error unless I am able
to specify the exact part values for each partition layer. Either that or
there is a wildcard that can be used for a partition that I am unaware of.
Also, I looked into the get_partition_by_filter function but there are no
usages of it in the code (no tests even!) that give any hint as to how the
filter string is used.

Thanks for the help!

--
Matt