How to insert the NULL in place of no data in CSV input fields having no data?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 10:55 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 12:23 AM
plese help me on that

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 12:35 AM
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
BR,
Pero M.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 02:28 AM
Thanks @pmancevski , its working fine.
