You use the Select transform to
retrieve database information and to perform transformations between
the input elements and the output elements of the Message Assembly.
About this task
You can use the Select transform
in a message map to enrich a message with database information.
The Select transform
retrieves records from a database based on the SQL where
clause that you define when you add tables to a message
map.
A Select transform has a nested
map. This nested map is where you transform the input and output elements
of the Message Assembly.
You can set the cardinality of the Input
array indexes in the Select transform
properties view to work with a particular row or set of rows, or you
can leave this field blank to choose all rows.
This section
explains how to configure the Select transform
when the data available in three database tables is retrieved in one
result set.
Procedure
Complete the following steps to enrich a message with
the address of a client from the CLIENTS database:
- Open the message map FindAddress.map in
the Graphical Data Mapping editor.
- Connect the database section ResultSet to
the message assembly body section FindAddressResponse with
a Select transform.
- Set the cardinality of the Input array indexes to 1 in
the Select transform properties view to indicate
that you only wish to work with the first row of the result set returned
by the database.
The following figure shows the Properties tab
of the Select transform:

- Connect the message assembly element Name to
the Select transform.
The
following figure shows the element Name connected
to the Select transform:

- Connect the message assembly element Country to
the Select transform.
The
following figure shows the element Country connected
to the Select transform:

- Navigate into the Select transform, by clicking the icon in the
top right of the Select transform.
The nested map associated to the Select transform opens.
The following figure shows the nested map with the input and output objects.

-
Define the transforms between the database elements and the message assembly output elements.
This can be automatically completed by using the Auto map (automap) capability. To manually define
each transform complete the following steps:
-
Connect the input element Name to the output element
Name in the message assembly body section
FindAddressResponse with a Move transform.
-
Connect the input element Country to the output element
Country in the message assembly body section
FindAddressResponse with a Move transform.
-
Connect the element TYPE to the element Type in
the message assembly body section FindAddressResponse with a
Move transform.
-
Connect the element NUMBER to the element Number
in the message assembly body section FindAddressResponse with a
Move transform.
-
Connect the elements LINEADDRESS2 and
LINEADDRESS1 to the element Street in the message
assembly body section FindAddressResponse with a
fn:concat transform.
-
Connect the element POSTCODE to the element
Postcode in the message assembly body section
FindAddressResponse with a Move transform.
-
Connect the element CITY to the element City in
the message assembly body section FindAddressResponse with a
Move transform.
-
Connect the element ADDITIONALINFO to the element
AdditionalInfo in the message assembly body section
FindAddressResponse with a Move transform.
-
Connect the element AREA to the element Area in
the message assembly body section FindAddressResponse with a
Move transform.
-
Connect the element PREFIX to the element Prefix
in the message assembly body section FindAddressResponse with a
Move transform.
-
Connect the element LOCAL to the element Local in
the message assembly body section FindAddressResponse with a
Move transform.
Results
You have successfully configured the nested map of the Select transform.
The
following figure shows the nested map:

What to do next
Handle failure of the Select transform
in a message map. For more information, see Handling database failures in a Select transform.