cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert the NULL in place of no data in CSV input fields having no data?

sathishmadavali
New Contributor II

hi team,
the input file having csv data with empty rows in some fields, how to insert the NULL in place of no data in the row.

thanks

3 REPLIES 3

sathishmadavali
New Contributor II

plese help me on that

pmancevski
New Contributor III

Hi @sathishmadavali,

After CSV parser add mapper and with ternary operator check/map if the field is empty. If it is then add null if not pass the field.
Example:
$fieldName == “” ? null : $fieldName

image

BR,
Pero M.

sathishmadavali
New Contributor II

Thanks @pmancevski , its working fine.