CsvIterator fails when the file size is >100Mb script gives unknown error — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started with Redwood: Oracle Cloud SCM and Purchasing

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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!