Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Recursive LookUp

Hi Experts,

I have two files in with below sample data.

File 1:    

UIDs

ABCD

EFGH

HIJK

JKLM

LMNO

OPQR

QRST

STUV

UVWX

WXYZ


File 2:

UIDREF1

ABCD

UIDREF2

LMNO

EFGHWXYZ
HIJKSTUV
LMNOWXYZ

I want to find for each record in File 1, recursive references in file 2. Meaning, for example, if I consider, ABCD from file 1, it is referenced in File 2, along with LMNO. Then LMNO is internally references WXYZ, and in turn WXYZ references EFGH. There the cycle stops. So the results is

ABCD -> LMNO -> WXYZ -> EFGH.

Similarly next record in file 1 is EFGH for which similar logic applied, result shall be

EFGH -> WXYZ -> LMNO -> ABCD.

Kindly Provide me with a script for achieving this.

2 Replies
jonas_rezende
Specialist
Specialist

Hi, vamsi kanduri.

When chosen  UIDs = LMNO in File 1, what will be the result?

MarcoWedel

maybe you could use the hierarchy prefix in your load?

regards

Marco