ETL (short for Extract, Transform and Load) is the first stage prior to network training. Customer churn data is in CSV format. We need to extract it and put it in a record reader object to process further. In this recipe, we extract the data from a CSV file.
Extracting data from CSV input
How to do it...
- Create CSVRecordReader to hold customer churn data:
RecordReader recordReader = new CSVRecordReader(1,',');
- Add data to CSVRecordReader:
File file = new File("Churn_Modelling.csv");
recordReader.initialize(new FileSplit(file));