08-11-2017 01:13 PM
I am working on a pipeline where I am reading data from CSV generator.
I have 2 types of data H line and I line for each one I need to do some mapping, which is fine. the final output I need to sent to SAP with a format H + I
So I need to merge the H line to each I line and then post to SAP.
Can someone help me achieve this? As all the values are in an independent document I am not able to do it easily. I tried Join and Union followed bu Group by but still not getting desired result.
Desired result:
/KS
08-11-2017 01:23 PM
Is there a key that you can use to join the data? If not could you add an artificial key and then join the two documents?
08-14-2017 03:42 AM
I tried using merge operation to add sequence but I get the error,
Snap has the following errors. Please open the info box and edit the highlighted fields.
Failure: Invalid JSON-path: $group[*].DOCUMENTHEADER, Reason: Field not found in JSON object: DOCUMENTHEADER, Resolution: Check the path syntax
I tried to use join operation, the output is
How to merge the documents?
08-14-2017 08:25 AM
Do H and I refer to Header and Line data?
Do you only have one H and multiple I lines?
If so, copy the incoming stream and process them independently and merge join them after you are done processing.
Hope it makes sense.
Let us know if this is not what is expected.
08-14-2017 12:02 PM
Thanks for the input.
Yes H and I are for header and line items.
I have done similar thing where I am routing H and I to different mapper and processing them individually. Once done I did a merge join and getting one H+I and I in 2 documents. I want H+I+I in one document.
/KS