cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Order sort

deepanshu_1
New Contributor III

Dear All,

I am implementing a pipeline but I am taking more than enough snaps, my output is:

image

Desired output:

image

Is this possible using a single mapper snap?

Thanks in advance.

10 REPLIES 10

AleksandarAngel
Contributor III

Hi @deepanshu.1,

Iโ€™ve managed to do this using only one Mapper snap, but in addition I used a Group By N Snap with the Group size set to 0 before the Mapper, and a JSON Splitter afterwards.
Hereโ€™s the expression:
image
And hereโ€™s the pipeline:
SampleWeatherAPIResponseMap_2022_02_28.slp (10.9 KB)

BR,
Aleksandar

Dear Aleksandar,

Thanks for the reply but I am facing issue below:
image

BR,
Deepanshu

Hi @deepanshu.1 ,

Can you please attach the output of the REST API (I suppose it is in JSON format) ?

Cheers,
Marjan

Hi Marjan,

Below is the output:

[

{

โ€œgroupโ€:[

{

โ€œlocationโ€:

โ€œKonstanzโ€

โ€œtempโ€:

269.63

โ€œpressureโ€:

1028

โ€œhumidityโ€:

82

}

{

โ€œlocationโ€:

โ€œIndiaโ€

โ€œtempโ€:

305.49

โ€œpressureโ€:

1013

โ€œhumidityโ€:

15

}

{

โ€œlocationโ€:

โ€œNovinkiโ€

โ€œtempโ€:

265.38

โ€œpressureโ€:

1035

โ€œhumidityโ€:

87

}

{

โ€œlocationโ€:

โ€œPtitsefabrikaโ€

โ€œtempโ€:

283.25

โ€œpressureโ€:

1018

โ€œhumidityโ€:

80

}

]

}

]

Regards,
Deepanshu