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

Mapper help required

yash_verma
New Contributor

Hi team,

How can I dynamically generate the mapper output. scenario is

Name id email
yash 1 Y
suresh 2

in above example email id null for id 2 so I need to create key value accordingly to send to rest api post
for 1st row
{โ€œNameโ€ : โ€œyashโ€,
โ€œidโ€ : โ€œ1โ€ ,
โ€œemailโ€ : โ€œYโ€ }
for 2nd row output shld be

{โ€œNameโ€ : โ€œyashโ€,
โ€œidโ€ : โ€œ1โ€ }

pls help if not in mapper than in which component i can accomplish this

6 REPLIES 6

PratapKr_Gayen
New Contributor II

please check the pipeline.
mapper use_2020_10_14.slp (5.9 KB)

Thanks but this is not what I required. If my input has 2 records I should always get output as 2 only. only difference between first and second row is what i mentioned in my original query

PratapKr_Gayen
New Contributor II

Hope This will help you.
Out put :
[{โ€œidโ€:โ€œ1โ€,โ€œNameโ€:โ€œYashโ€,โ€œemailโ€:โ€œYโ€},{โ€œidโ€:โ€œ1โ€,โ€œNameโ€:โ€œYashโ€}]mapper use_2020_10_14.slp (9.9 KB)

In your pipeline you are copying only the one record of yash twice where as suresh is missingโ€ฆ