@Override public void execute(FunctionContext context) throws Exception { String[] csvParameters = this.csvReader.readNext(); if (csvParameters == null) { csvReader.close(); initializeCSVReader(context); csvParameters = this.csvReader.readNext(); } if (csvParameters != null) { for (int headerI = 0; headerI < headers.length; headerI++) { context.addParameter(headers[headerI], csvParameters[headerI]); } } }