Skip to content

Instantly share code, notes, and snippets.

View khanhtran's full-sized avatar

Khanh Tran khanhtran

  • Columbus, Ohio, US
  • 04:28 (UTC -04:00)
View GitHub Profile
def requiredColumnsRegs = [/ISSN|ISBN10/,/eISSN|ISSN13/,/Title/]
for (record in records) {
try {
if (!haveRequiredColumns(requiredColumnsRegs, record)) {
record.value['drop-file'] = true
}
output.write(record)
} catch (e) {
// Write a record to the error pipeline
log.error(e.toString(), e)