Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use the following Groovy code to iterate through each record (field,value) pair:

for (record in records) {
  try {     
    // Access each record field and its value
    for ( record_dict in record.value ) {
      log.info("=== field: {} | value: {}",record_dict.key,record.value[record_dict.key])

      // do something...
    }
    output.write(record)
  } catch (e) {
    log.error(e.toString(), e)
    error.write(record, e.toString())
  }
}

Cheers, Dash