Skip to content

process.reject ​

Rejects the current record in a process's data function, as invalid. The rest of data doesn't run for this record, and the process carries on with the next one. The message is counted and shown in the process log when the process finishes.

js
process.reject(message)
process.reject(group, message)

Parameters ​

ParameterTypeDescription
groupstringOptional. A group to list the message under in the log.
messagestringThe reason the record was rejected.

Examples ​

js
function data(record) {
    // This function is called once for each line of data on the second cycle
    // Use this to build dimensions and push data into cubes

    if (record.name == "Demo") {
        process.reject("Error", "Rejecting record with name 'Demo'.");
    }

    // Continue rest of data function
}
text
Rejection Log:
Group: Error
Rejecting record with name 'Demo'. [3]

Each message is listed once, with a count of how many times it happened. Here, three records were named Demo.