Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to find References of table entries recursively ?

Hello Experts,

I have a table (a flat file with data) PUID as shown below

ABCD

EFGH

HIJK

JKLM

LMNO

OPQR

QRST

And I have another file PUIDREF which has entries like below.

ABCDLMNO
EFGHOPQR
HIJKOPQR
LMNOWXYZ

I am new to Qlikview and would like to solve this issue for one of my site consolidation tasks. I want find the references of entries from PUID in PUIDREF like below.

ABCD ~ LMNO

ABCD ~ WXYZ (This is because, ABCD is referencing LMNO and LMNO inturn WXYZ)

EFGH ~ OPQR

EFGH ~ HIJK

HIJK ~ OPQR

HIJK ~ EFGH

LMNO ~ WXYZ

Basically entries from PUID are searched in PUIDREF. this search continues in PUIDREF also, till there are no further references are found.  How can i achieve this in QlikView ?

7 Replies
Gysbert_Wassenaar

Try the Hierarchy function. See this blog post for more information: Unbalanced, n-level hierarchies


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

Thank you for the post. As I explained, i am new to QlikView and not so good about QlikView syntax.

I have gone through the posts about n-level hierarchies but not getting a clue on where to start. I would appreciate if you could help me write the script ?

Not applicable
Author

Also I would like to ask i have to analyse this data over 3.5 billion records. Will QlikView be able to handle this much data with Hierarchy function, because, it increases the size of rows with the explanation given in the blogs by Heric.

Gysbert_Wassenaar

It looks like you want to do a network graph analysis. The hierarchy function can't help solve that completely. Perhaps another tool will suit that purpose better.

Qlikview can handle 3.5 billion rows given enough ram and cpu resources. But perhaps your server can't.


talk is cheap, supply exceeds demand
Not applicable
Author

I will try to explain pictorially. My feel is that QlikView can solve, but i am not able to explain / explore properly.

Capture2.PNG

If you see the above picture, i have two files. I am trying to figure all references of elements from file 1. What i mean is, i take ABCD, and search in file 2. i get, LMNO, Now LMNO is refereing WXYZ internally, and WXYZ is internally refering EFGH. I want to list till there is no further reference is found.

ABCD -> LMNO -> WXYZ -> EFGH.

Could you please help, if Qlikview can solve this ?

Gysbert_Wassenaar

ABCD -> LMNO -> WXYZ -> EFGH.

That can be done with the Hierarchy function.

But getting from

EFGH OPQR

HIJK OPQR

To EFGH ~ HIJK and HIJK ~ EFGH is not possible with the Hierarchy function. I don't know of a good way to resolve that relationship.


talk is cheap, supply exceeds demand
Not applicable
Author

For each record from file 1, i would be searching all references like ABCD -> LMNO -> WXYZ -> EFGH in file 2.

But i am not interested to move from EFGH to HIJK because they are not referenced right.. I would like

EFGH -> WXYZ -> LMNO -> ABCD.

If you say moving from ABCD -> LMNO -> WXYZ -> EFGH is possible, could you please send me the Script of Hierarchy implementation ?