I'm running NiFi 1.10
My requirement is to read csv data and translate one of the csv column data into csv. What's the best way?
Thanks,
Created 01-07-2020 02:55 PM
@sandeep1 There are a few ways to handle this. Generally speaking you need to pick up the file, parse the file, transform the file, and send it on. Part of the fun with NiFi is completing this task. My recommendation is to start with some known CSV examples. Get them working, then adjust them for your scenario.
If you reply with a sample of your CSV, and more clear idea of what you are doing I can provide a better example or a template. How are you going to get the CSV into NiFi?
Also your post subject, and the body conflicts: Do you want to do csv to lower case OR parse a column to get a different csv?
Created 01-08-2020 01:06 AM
I'm getting csv file by GetFile processor and then passing onto next processor to convertCSVtoAvro.
Before converting to Avro format I've to transform one of the column data to lower case.
CSV Sample below, I need to read this csv and convert "Causes" column data into lower case and other column data to be as is.
Causes | Source | Date |
Application Performs the wrong function | Application | 06-06-18 |
Performs Right function but Takes too Long | Application | 06-06-18 |
Mis-matched Sequencing During Application execution | Application | 06-06-18 |
Middle ware failure with no Acknowledgment | WebServer | 06-06-18 |
Third Party Application or License error | Other | 06-06-18 |
Created 01-08-2020 03:17 AM
I was able to do it with a issue.
I used UpdateRecord Processor
In Properties added -
/Causes ${field.value:toLower()}
This converts values to Lower but it creates an additional header line