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