- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Replace /N with empty string in CSV File
Created ‎08-02-2019 09:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a CSV file in which nulls are represented by "/N". How can i go about replacing this with an empty string ''.
Sample
Year Age City Date
2013 \N London \N
2019 56 \N \N
2015 20 \N 12/12/2019
I would like to replace this, so that the file looks like the below.
Year Age City Date
2013 London
2019 56
2015 20 12/12/2019
Which processors can i use to achieve this and what is the syntax to be used.
Created on ‎08-03-2019 10:11 PM - edited ‎08-17-2019 04:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to solve the problem by using ReplaceText processor below. For Replacement Value, I hit "tab"
Created on ‎08-02-2019 11:18 PM - edited ‎08-17-2019 04:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use a ReplaceText processor which replaces \A\n|\n*\s*(?=\n) with '' (empty replacement value). The search regex looks for:
\n*\s*(?=\n) - newline (0 or more) followed by whitespace (0 or more) followed by a newline.
Created ‎08-03-2019 10:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This was helpful
Created ‎08-03-2019 03:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The above question and the entire response thread below were originally posted in the Community Help track. On Sat Aug 3 14:59 UTC 2019, a member of the HCC moderation staff moved it to the Data Ingestion & Streaming track. The Community Help Track is intended for questions about using the HCC site itself.
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created on ‎08-03-2019 10:11 PM - edited ‎08-17-2019 04:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to solve the problem by using ReplaceText processor below. For Replacement Value, I hit "tab"
Created ‎08-04-2019 07:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great that your problem was resolved.
