Forum Discussion
dmiller
6 years agoFormer Employee
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)?
- philliperamos6 years agoContributor
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.- cjhoward186 years agoEmployee
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.