Skip to main content

drop_field

This drop_field processor drops a field from a DataEntity or DataWindow.

Usage

Drop a field from a document

Example of a job using the drop_field processor

{
"name" : "testing",
"workers" : 1,
"slicers" : 1,
"lifecycle" : "once",
"assets" : [
"standard"
],
"operations" : [
{
"_op": "test-reader"
},
{
"_op": "drop_field",
"field": "name"
}
]
}

Output from example job

const data = [
DataEntity.make({ name: 'lilly', otherField: 1 }),
DataEntity.make({ name: 'willy', otherField: 2 }),
DataEntity.make({ name: 'billy', otherField: 3 }),
DataEntity.make({ otherField: 4 }),
]

const results = await processor.run(data);

DataEntity.make({ otherField: 1 }),
DataEntity.make({ otherField: 2 }),
DataEntity.make({ otherField: 3 }),
DataEntity.make({ otherField: 4 }),

Parameters

ConfigurationDescriptionTypeNotes
_opName of operation, it must reflect the exact name of the fileStringrequired
fieldName of field to removeStringrequired, no default