You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by yogesh dhari <yo...@gmail.com> on 2014/10/22 07:55:45 UTC

USE CASE:: Hierarchical Structure in Hive and Java

Hello All,

We are having a use case where we need to create the hierarchical structure
using Hive and Java

For example
Lets say in an organisation we need to create Org chart
i.e. Senior director -> director -> associate director -> senior manager ->
manager -> senior associate -> associate -> Developer
means parent child then sub child and so on.

Input Source: summarized table which is getting populated after running the
joins  which will run business logic and fetch the data from base table.
Output: Table which store the parent child relationship in a hierarchical
manner


If anyone come across this kind of requirement/scenario kindly suggest the
approach to proceed.

Thanks in Advance....


Thanks & Regards
Yogesh

Re: USE CASE:: Hierarchical Structure in Hive and Java

Posted by Peyman Mohajerian <mo...@gmail.com>.
I can think of two approaches, one is to use hbase and use
hbasestoragehandler in hive to read the data, handling hierarchical
structures is easier in hbase, or in hive just store the data from left to
right in a single row with flexible number of columns. You can also store
it in json or xml and use serd to read the data in either columnar or row
format.
I'm sure there are other ways too.

On Wed, Oct 22, 2014 at 1:55 AM, yogesh dhari <yo...@gmail.com> wrote:

> Hello All,
>
> We are having a use case where we need to create the hierarchical
> structure using Hive and Java
>
> For example
> Lets say in an organisation we need to create Org chart
> i.e. Senior director -> director -> associate director -> senior manager
> -> manager -> senior associate -> associate -> Developer
> means parent child then sub child and so on.
>
> Input Source: summarized table which is getting populated after running
> the joins  which will run business logic and fetch the data from base table.
> Output: Table which store the parent child relationship in a hierarchical
> manner
>
>
> If anyone come across this kind of requirement/scenario kindly suggest the
> approach to proceed.
>
> Thanks in Advance....
>
>
> Thanks & Regards
> Yogesh
>
>