The Clean Object operator can be used to streamline data by removing any properties (or fields) that contain a null value from an object. This operation is useful when you want to clean up data before passing it to another part of your application or system. By using this operator, you can ensure that objects do not include unnecessary null values, which could cause issues when processing or storing data.
Configuration
In this how-to guide, you'll create a data table that stores some sample data. You'll also add a Data Workflow component to create null values and another to test the omit function.
Configure the Data Table Component
First, you'll set up a Data Table component that includes a value with a company name.
In the Module Builder, drag and drop a Data Table component onto your canvas.
In the Property ID and Label Text fields, enter
dtSampleData.In the data table, enter the following:
#
value
company
1
12
Unqork
2
34
Cvent
3
56
Trustpilot
4
78
BetterWorks
5
90
J.P. Morgan
.png)
Click Save Component.
Configure the Hidden Components
Next, add two Hidden components to store the outputs of each Data Workflow component.
Drag and drop two Hidden components onto your canvas, placing them below your
dtSampleDataData Table component.Enter the following Property ID and Label Text values:
Property ID
Label Text
dataWithNullValues
dataWithNullValues
dataWithoutNulls
dataWithoutNulls
Click Save Component as you add each component.
Configure the First Data Workflow Component
This Data Workflow component creates the null values you'll convert with the Clean Object operator.
Drag and drop a Data Workflow component onto your canvas, placing it between the
dtSampleDataData Table anddataWithNullValuesHidden components.In the Property ID and Canvas Label Text fields, enter
dwfCreateNullValues.
Configure the Input Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
dtSampleData
Required
Yes
Source
Default
Configure the Create Field Operator
You’ll configure a Create Field operator to add an extra value to the data. Each object includes a testField with the value of null.
Drag and drop a Create Field operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Formula
Label
Create Test Field
Do Not Sanitize Formula
(checked)Field 1
testField=NULL
Field 2
Field 3
Field 4
Field 5
Connect the output port (right) of the
dtSampleDataInput operator to the input port (left) of theCreate Test FieldCreate Field operator.
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
dataWithoutNulls
Action
value
Connect the output port (right) of the
Create Test FieldCreate Field operator to the input port (left) of thedataWithoutNullsOutput operator..png)
Click Save Component.
Configure the Second Data Workflow Component
Drag and drop another Data Workflow component onto your canvas, placing it between the
dataWithNullValuesanddataWithoutNullsHidden components.In the Property ID and Canvas Label Text fields, enter
dwfOmitNull.
Configure the Input Data Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
dataWithNullValues
Required
Yes
Source
Default
Configure the Clean Object Operator
This operator removes all the values from the null values from the dataWithNullValues Hidden component.
Drag and drop a Clean Object operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Clean Object
Label
Omit Null
Clean Action
Omit Null
Connect the output port (right) of the
dataWithNullValuesInput operator to the input port (left) of theOmit NullClean Object operator.
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
nullToEmptyString
Action
value
Connect the output port (right) of the
Omit NullClean Object operator to the input port (left) of thenullToEmptyStringOutput operator..png)
Click Save Component.
Save your module.
Here's how your module looks in the Module Builder:
.png)
Preview your module in Express View and open the DevTools Console. You'll see the null value in testField has been omitted from the data.

.png)
The Clean Object operator can be used to streamline data by removing any properties (or fields) that contain a null value from an object. This operation is useful when you want to clean up data before passing it to another part of your application or system. By using this operator, you can ensure that objects do not include unnecessary null values, which could cause issues when processing or storing data.
Configuration
In this how-to guide, you'll create a data table that stores some sample data. You'll also add a Data Workflow component to create null values and another to test the omit function.
Configure the Data Table Component
First, you'll set up a Data Table component that includes a value with a company name.
In the Module Builder, drag and drop a Data Table component onto your canvas.
In the Label and Property Name fields, enter
dtSampleData.In the data table, enter the following:
#
value
company
1
12
Unqork
2
34
Cvent
3
56
Trustpilot
4
78
BetterWorks
5
90
J.P. Morgan

Click Save.
Configure the Hidden Components
Next, add two Hidden components to store the outputs of each Data Workflow component.
Drag and drop two Hidden components onto your canvas, placing them below your
dtSampleDataData Table component.Enter the following Property ID and Canvas Label Text values:
Property ID
Canvas Label Text
dataWithNullValues
dataWithNullValues
dataWithoutNulls
dataWithoutNulls
Save & Close each component as you add it.
Configure the First Data Workflow Component
This Data Workflow component creates the null values you'll convert with the Clean Object operator.
Drag and drop a Data Workflow component onto your canvas.
In the Canvas Label Text and Property Name fields, enter
dwfCreateNullValues.
Configure the Input Data Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
dtSampleData
Required
Yes
Source
Default
Configure the Create Field Operator
You’ll configure a Create Field operator to add an extra value to the data. Each object includes a testField with the value of null.
Drag and drop a Create Field operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Formula
Label
Create Test Field
Do Not Sanitize Formula
(checked)Field 1
testField=NULL
Field 2
Field 3
Field 4
Field 5
Connect the output port (right) of the
dtSampleDataInput operator to the input port (left) of theCreate Test FieldCreate Field operator.
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
dataWithoutNulls
Action
value
Connect the output port (right) of the
Create Test FieldCreate Value operator to the input port (left) of thedataWithoutNullsOutput operator..png)
Click Save.
Configure the Second Data Workflow Component
Drag and drop another Data Workflow component onto your canvas.
In the Canvas Label Text and Property Name fields, enter
dwOmitNull.
Configure the Input Data Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
dataWithNullValues
Required
Yes
Source
Default
Configure the Clean Object Operator
This operator removes all the values from the null values from the dataWithNullValues Hidden component.
Drag and drop a Clean Object operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Clean Object
Label
Omit Null
Clean Action
Omit Null
Connect the output port (right) of the
dataWithNullValuesInput operator to the input port (left) of theOmit NullClean Object operator.
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
nullToEmptyString
Action
value
Connect the output port (right) of the
Omit NullClean Object operator to the input port (left) of thenullToEmptyStringOutput operator..png)
Click Save.
Save your module.
Here's how your module looks in the Module Builder:
.png)
Preview your module in Express View and open the DevTools Console. You'll see the null value in testField has been omitted from the data.
