- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Nifi - How to remove empty lines in a file
- Labels:
-
Apache NiFi
Created 11-04-2016 07:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I have a CSV file which contains 3 empty lines at the end of the file. Is there a way to remove these from the end of file?
I mean, the file has multiple rows, and I dont split the file. Was wondering if I could remove the spaces without splitting.
Thanks
Obaid
Created on 11-07-2016 03:35 PM - edited 08-18-2019 04:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am able to address this using the SplitContent processor. Check the config. below.
It will split out two files one with Actual content you needed and second is the empty one. You can use update attribute processor to rename the files as per your requiremetns.
Created on 11-07-2016 03:35 PM - edited 08-18-2019 04:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am able to address this using the SplitContent processor. Check the config. below.
It will split out two files one with Actual content you needed and second is the empty one. You can use update attribute processor to rename the files as per your requiremetns.
