read only selective columns from csv file using spring batch
there is one csv file having 100 columns, but we need only 3-5 columns which needs to be loaded into database. I dont want to specify all the 100 columns in linetokenizer in job xml. Please suggest how we can proceed in this case arkabhi Try using a custom fieldSetMapper. You can use it similar to a ResultSet with indexes. You have to list all the column names only if you want automatic mapping. Specify only the delimiter, in your case "," <bean id="flatFileItemReader" class="org.springframework.batch.item.file.FlatFileItemReader" scope="step"> <property name="resource" value="YOURFILE" />