Creating a nil output element
In the Graphical
Data Mapping editor,
you can use the Create transform, the Move transform,
the Custom Java transform, the Custom
ESQL transform, or the return value of a database to
create a nil output element.
Before you begin
When you map null values, consider
the Graphical
Data Mapping editor behavior.
For more information, see Handling nulls in message maps.
Procedure
Choose any of the following methods to create a nil output
element:
Example
Example: Use the Create transform to create
a simple type output element as nil
This example
shows how to use the Create transform to create
a simple type output element as nil in the Graphical
Data Mapping editor.
You can use
the Create transform to create an output element
with xsi:nil="true", also called a nil element, without
the use of input data.
Note: The option to create a nil element
is available only when the output element is nillable.
Complete
the following steps to create a simple nil output element:
- Add a Create transform to set the value
of the output element.
- Click the output element and drag the connector towards the input
elements, releasing the connector onto a blank part of the canvas.
When you release the connector, an Assign transform
is created.
- Select the drop-down, and select .
- In the Properties panel, select the General tab.
Then, select Create nil.
Example: Use the Create transform
to create a complex type output element as nil
This
example shows how to use the Create transform
to create a complex type output element as nil in the Graphical
Data Mapping editor.
Note: The
option to create a nil element is available only when the output element
is nillable.
Note: The Create transform
has a nested map, however, you cannot create or assign fields within
a complex nil output element. You will get the following error: Cannot
create or assign fields within nil target. To allow mapping, change
parent Create transform to create empty instead of nil.
- Click the output element and drag the connector towards the input
elements, releasing the connector onto a blank part of the canvas.
When you release the connector, a Create transform
is created.
- In the Properties panel, select the General tab.
Then, select Create nil.