Hi All, How do I represent hierarchical information in flat file and process it in Pig?
Let’s say I have objects of type A. I want to have a Tree representation with their parent-child relationships. In scenario 1: A1 points to A2; A2 points to A3; A3 points to A4; A4 points to Am and so on till An. Given above definition; I want to be able to answer following : Child(A1) = A2 Parent(A4) = A3 Descendant(A1) = A2,A3,A4, Am… An Ancestor(A4) = A3,A2,A1 Ancestor (An) = Am,…A4,A3,A2,A1 Can this be represented in text file and queried in Pig. Appreciate any pointers/suggestions. Thanks!
