I'm looking for an efficient way to build multiple parent child event pairs into a flat string of parent,children,grandchildren etc. I'd prefer not to use join if possible.
I have a set of data representing parent child relationships for process steps completed. The source data does not (consistently) maintain a lineage for any particular iteration, and it's possible to fork a single parent into many children, or for two parents to converge to one child.
For example:
Parent Child
AM BU
AK BT
BU CY
BT CX
CY D0
CY DZ
CX D9
CX D8
CX D1
CX D0
CX D2
Each row in that table represents a simplified event in my summary index, which contains 2M+ event records.
The ideal output would be a mv or delimited field with one entry per 'step' down the hierarchy, for ex:
AM, BU, CY, D0
AM, BU, CY, DZ
AM, BT, CX, D0
AK, BT, CX, D8
Note that sometimes two processes can also converge to a final step, i.e. in the example of D0. In this case there are two separate processes for D0 that share an identifier but have slightly different properties.
The heirarchy can have different levels based on what fields are in it and there's not a consistent nomenclature for the parent child ids.
There is a field which summarizes the steps taken, i.e. something link ABCD, but not every processing step generates a new parent child pairing. Building a dictionary for that field nomenclature would be possible via a lookup - but then would have to be maintained.
I had done something that mostly works with iterative joins but it's messy and slow. Transaction is also slow and seems to be dropping events. I'd also like something than can continuously update itself to the summary index (via report/alert) as new parent/child events come in.
So for ex, if a new event came in with Parent=D0 and Child=E9
The two associated hierarchies would go :
AM, BU, CY, D0, E9
AM, BT, CX, D0, E9
... View more