/
Rename directive
Rename directive
The RENAME directive renames an existing column in the record. The RENAME directive is case sensitive.
Syntax
rename :source :target
source
is the name of an existing column to be renamed.target
is the new name of the column.
Usage Notes
The RENAME directive will rename the specified column name by replacing it with a new name. The original column name will no longer be available in the record after this directive has been applied to the record.
The RENAME directive will only rename a column that exists. If the column name does not exist in the record, the operation will be ignored without an error.
Example
Using this record as an example:
{
"x": 6.3,
"y": 187,
"codes": {
"a": "code1",
"b": 2
}
}
Applying these directives:
rename :x :height
rename :y :weight
results in this record:
{
"height": 6.3,
"weight": 187,
"codes": {
"a": "code1",
"b": 2
}
}
, multiple selections available,
Related content
Merge directive
Merge directive
Read with this
Directives
Directives
Read with this
Set Headers directive
Set Headers directive
Read with this
Keep directive
Keep directive
Read with this
Set Column directive
Set Column directive
Read with this
Create Record directive
Create Record directive
Read with this
Created in 2020 by Google Inc.