cancel
Showing results for 
Search instead for 
Did you mean: 

Merging output of one document in next

krupalibshah
Contributor

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.

image

image

image

Desired result:

image

/KS

10 REPLIES 10

Try doing this. Of course I used all dummy variables but here are the main steps.

  1. Read Incoming file into 2 parsers
  2. Read the first one with header H
  3. Read the second one with I
  4. Do any Transformations specific to H and I on that specific route
  5. On the I route, merge all of them into a single array
  6. Merge join them in the end
  7. After the join, use JSON splitter on the I and add each individual H item using the “Including Path”
  8. You can do further massaging of the data after the JSON splitter.

Look at this example.

H and I_2017_08_15.slp (8.5 KB)

I get this error,

image

/KS

Solved the issue and I can see one header and 2 line items in one document.
Thanks for the help.

Piyush
New Contributor III

Can you kindly share the final solution

image

Output 1

image

Output 2

image