Forum Discussion
SpiroTaleski
5 years agoValued Contributor
Hi @ppankaj88,
You can try with the “hasPath” object function and Conditional(Ternary) operator.
ex: $.hasPath(“col1”) ? $col1 : ($.hasPath(“col2”) ? $col2 : “”)
The above expression will check:
- if col1 is present on the source, then take the col1
- if col1 is missing from the source, then check if col2 is present on the source
- if col2 is present on the source then take the col2
- if both columns are missing then the target will be empty string
Also, I am attaching a simple pipeline as an example:
SL_Community_2020_08_24.slp (4.8 KB)
Hope this helps.
Regards,
Spiro Taleski