The remove operator removes a field from a record.
| Field | Default | Description |
|---|---|---|
id |
remove |
A unique identifier for the operator |
output |
Next in pipeline | The connected operator(s) that will receive all outbound entries |
field |
required | The field to remove. |
on_error |
send |
The behavior of the operator if it encounters an error. See on_error |
if |
An expression that, when set, will be evaluated to determine whether this operator should be used for the given entry. This allows you to do easy conditional parsing without branching logic with routers. |
Example usage:
Remove a value from the record
- type: remove
field: key1| Input Entry | Output Entry |
{
"resource": { },
"labels": { },
"record": {
"key1": "val1",
}
} |
{
"resource": { },
"labels": { },
"record": { }
} |
Remove an object from the record
- type: remove
field: object| Input Entry | Output Entry |
{
"resource": { },
"labels": { },
"record": {
"object": {
"nestedkey": "nestedval"
},
"key": "val"
},
} |
{
"resource": { },
"labels": { },
"record": {
"key": "val"
}
} |
Remove a value from labels
- type: remove
field: $labels.otherkey| Input Entry | Output Entry |
{
"resource": { },
"labels": {
"otherkey": "val"
},
"record": {
"key": "val"
},
} |
{
"resource": { },
"labels": { },
"record": {
"key": "val"
}
} |
Remove a value from resource
- type: remove
field: $resource.otherkey| Input Entry | Output Entry |
{
"resource": {
"otherkey": "val"
},
"labels": { },
"record": {
"key": "val"
},
} |
{
"resource": { },
"labels": { },
"record": {
"key": "val"
}
} |