In the Graphical
Data Mapping editor,
select Custom ESQL from the Custom
Transforms list. You can then use the transform properties
to select ESQL code that is stored in your workspace. When you select
the ESQL route, the Parameters table Name and Type
columns are populated. You must then select an input element or
XPath expression in the Value column for
each parameter. You can use the content assist in the Value column
to help you to assign the required element, literal, or XPath
expression.
The following topics contain further information
about ESQL types and functions:
The ESQL file that contains the referenced ESQL module
must be visible for mapping to be selectable. Ensure that the application,
library, or project references are set to make the ESQL file accessible
to the map. When you deploy the map, ensure that the ESQL file is
also deployed, and that Compile and in-line resources is
not selected.
Requirements for ESQL modules that are
called from a graphical data map
The
following requirements apply to ESQL modules that are called from
a graphical data map:
- The syntax of an ESQL procedure is shown in CREATE
PROCEDURE statement. The procedures that can be called from
a Custom ESQL transform in a graphical data map must conform to the
following requirements:
- Only IN parameters are allowed
- A RETURN is required
- A return data type must be a simple scalar.
- An input parameter data type must be a simple scalar, or an ESQL
REFERENCE where the reference variable meets the following criteria:
- The reference variable is used to access only the input element
or descendants of the input element.
- The input element and any descendants that are accessed by using
the reference variable are defined in the input message model.
- An ESQL module with no inputs can be used to assign to an output
element.
- Each input parameter to the ESQL module can be taken from an input
element that is wired into the custom ESQL transform or specified
as a constant.
- The ESQL must not include SQL calls to a data source. The Graphical
Data Mapping editor provides facilities
to include database operations in the map. For more information, see Mapping database content.
Note: The target element of a Custom ESQL transform is always
created and given the value that is returned by the associated ESQL
procedure. If the ESQL procedure returns ESQL NULL, the transform
creates an element with an empty value. If you do not want an element
to be created, you can add a conditional expression.