CsvIterator fails when the file size is >100Mb script gives unknown error
Summary:
CsvIterator fails when the file size is >100Mb script gives unknown error when the size is reduced the same code works fine.
Content (please ensure you mask any confidential information):
CsvIterator fails when the file size is >100Mb script gives unknown error when the size is reduced the same code works fine.
try{
csvIterator(fileName).withCloseable() { rows ->
rows.eachWithIndex { row, idx ->
if(idx > 0) {
List<String> fileRecord = row.collect{it.toString().trim() } as List<String>
if( fileRecord.size() == 12) {
def (String Org, String Product, String ProductDescription) = [ fileRecord[2], fileRecord[3], fileRecord[12] ]
if(Org.substring(0,2) == "25") {
productMap["P025-" + Product] = "P025-" + Product + " - " + ProductDescription