10-15-2021 03:41 AM
Hi,
Can somebody tell me if there is an alternative for the group by field snap? I need to use that functionality in an ultra task and I know that the group by field snap is not compatible. What I need to get at is the following:
Input:
[
{“$id”:“1”,“company”:“es”,“accountNumber”:“4351”,“productCode”:“a000000011”,“productDescription”:“prod1”,“netPrice”:0.0,“currency”:“EUR”,“resultMessage”:“”},
{“$id”:“2”,“company”:“es”,“accountNumber”:“4351”,“productCode”:“a0000021a47”,“productDescription”:“prod2”,“netPrice”:190.630,“currency”:“EUR”,“resultMessage”:“”}
}]
Target:
[{“prices”:
[{“materialCode”:“a000000011”,“unitPrice”:0.0,“currency”:“EUR”,“priceType”:“MSD Price”},
{“materialCode”:“a0000021a47”,“unitPrice”:190.630,“currency”:“EUR”,“priceType”:“MSD Price”}
}]
}]
Hope that somebody can help me?
Thanks in advanced.
10-15-2021 08:08 AM
HI
Yes that is correct.
10-15-2021 10:20 AM
You can’t return more than one output document per input document from an Ultra pipeline. If your pipeline generates more than one, only the first will be used for the response. You might want to consider a Triggered task instead. It will execute a new pipeline instance for each request so is more flexible.
See the notes under “Output View Type” on this doc page:
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/731349232/Planning+Ultra+Pipeline+Tasks