02-11-2020 10:56 AM
Hi community,
I would like to create a Master Mapper of sorts that will accept an input stream of let’s say field1 and field2, and just output those fields.
Mapper:
TEST_MasterMapper_2020_02_11.slp (4.9 KB)
I’ve uploaded a sample pipeline of what I would like to achieve.
Thanks everyone in advance!
02-11-2020 12:11 PM
I’m trying to understand the ask. Are you saying you want a kind of universal Mapper configured to accept n number of fields, but if a field is not in the input, not to write that field to the output (instead of writing it with a null value)?
02-12-2020 03:43 AM
That’s correct.
I essentially have 25+ data sets to extract from a source system, and from those data sets, there are about 50 common fields.
Hence, a master mapper with the common fields, that will ignore the ‘missing’ fields.
02-12-2020 11:52 AM
In your example pipeline given, if you enable the Null-safe access in the mapper, then attach another mapper at the end with the expression: $.filter((value, key) => value != null)
mapped to the target: $
will give you all the values of your common mappings that are not null.