Skip to main content

Rename Fields

Renames one or more fields from the input documents. Keeps the field meta of the existing field(s).


This could re-order the fields, placing the renamed fields at the end.

Stage as JSON

For convenience there are two ways to declare this stage:

As an object (with keys and values)

$renameFields: {
"q10r1": "q10r01_new_name",
"q10r2": "q10r02_new_name",

As an array (with keys and values)

$renameFields: [
{ from: "q10r1", to: "q10r01" },
{ from: "q10r2", to: "q10r02" },