cancel
Showing results for 
Search instead for 
Did you mean: 

Alternative for group by Field snap in Ultra task

Richard
New Contributor III

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.

6 REPLIES 6

Richard
New Contributor III

HI

Yes that is correct.

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