Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am stuck with it and can't come up with any solution.
i have a table with two fields "product part" and "sub parts" it has arround 7 Million rows. i tried hierarcy and hierarcybelongsto both takes some hours and from 7 Million rows it creates 400+ Million rows and then server memmory runs out. i tried it on Qliksense desktop and after 7 hourse of loading still no success.
here is the senario
PART | SUB_PART |
A | F |
B | |
C | |
D | |
E | |
F | B |
G |
if we call Part column as "parent" and sub_part column as "child"
child B has the parent F, and F has the parent A.
what i am trying to do is to build a table like "Parent > Child > child > child"
find the lowest part and go up to the highest part number.
any suggestion or solution?
Hierarcybelongsto should work for that. Do you maybe have duplicate rows in the data? Or loops in the hierarchy (B belongs to F that belongs to A that belongs to B)?
If you know the depth of the tree you can manually join the table as well.
Try this. But I am not sure about the performance as you have millions of records.
tab1:
Hierarchy(SUB_PART, PART, Node,ParentName, Node,PathName, '/', Depth)
LOAD *, PART As Node;
LOAD * INLINE [
PART, SUB_PART
A, F
B,
C,
D,
E,
F, B
G,
];
Output:
Hi Saran, thanks for example, your inline table/script gives the expected results. i will try with original table and let us see what the outcome will be.