Ask Your Question

Revision history [back]

Each record does have a unique id - you can access it via the EL ${record:id()} - but I'm not sure it helps you here - it does uniquely identify each record, but it's not a sequence number.

One way to solve this would be to write a script for one of the evaluators to only pass on the first 50 records of each batch. This is quite straightforward - here it is in Groovy:

// Don't run off the end of the list if there are fewer than 50 records!
count = Math.min(50, records.length)

for (i = 0; i < count; i++) {
  try {
    // Write a record to the processor output
    output.write(records[i])
  } catch (e) {
    // Write a record to the error pipeline
    log.error(e.toString(), e)
    error.write(record, e.toString())
  }
}