Not really...

In my experience, Pig is only good at dealing with tabular data. The type
of graphical data you have is not workable in Pig. Have you considered
using a Graph database (such as Neo4j)? These databases are highly
optimized for doing the type of path queries you're looking for.


On Thu, Oct 24, 2013 at 10:09 PM, Something Something <
mailinglist...@gmail.com> wrote:

> Hello,
>
> Is there a way in Pig to go thru a parent-child hierarchy?  For example,
> let's say I've following data:
>
> Child    Parent   Value
> 1          10
> 10         20
> 20         30
> 30         40        v30
> 40         50        v40
>
>
> Now let's say, I look up Child=10, it has no 'Value', so I go to its parent
> (20), it has no value either, so now I go to its parent 30 & get v30.  This
> hierarchy could be up to 15 levels deep.
>
> I need to do this type of search for every line in a file containing
> millions of lines.
>
> Can I do this in Pig?  Please let me know.  Thanks.
>

Reply via email to