โ09-16-2018 11:51 PM
I created a simple pipeline which provides output in following format
[
{
โCURRENCY_CODEโ: โADPโ,
โCURRENCY_NAMEโ: โAndorran Pesetaโ
},
{
โCURRENCY_CODEโ: โAEDโ,
โCURRENCY_NAMEโ: โUAE Dirhamโ
},โฆ
]
I want the pipeline output to be like this
{
โapiVersionโ : โ1.0โ,
โCurrenciesโ: [
{
โCURRENCY_CODEโ: โADPโ,
โCURRENCY_NAMEโ: โAndorran Pesetaโ
},
{
โCURRENCY_CODEโ: โAEDโ,
โCURRENCY_NAMEโ: โUAE Dirhamโ
},โฆ
]
}
How can I do this preferably in a mapper, without using any scripting?
โ09-17-2018 07:16 AM
To group multiple documents into one document, youโll need to use a GroupByN snap configured like so:
Setting the group size to zero means that it will collect all of the input documents into a single output.
You can then use a Mapper to add the apiVersion header:
โ09-17-2018 11:14 AM
Thanks @tstack
Your solution worked!
โ09-20-2018 08:31 PM
I read in documentation that Group by N snap is not available for Ultra pipeline. Is there any alternative ?
โ09-28-2018 07:21 AM
Use Join Snap to Join 2 streams of Data.