You can use a Concat transform to concatenate data from two or more simple elements into a string output element.
The Concat transform concatenates two or more simple inputs into a string output element.
When you configure the Concat transform, you can specify a prefix, a suffix, and a delimiter through the Properties page:
You can specify an alphanumeric character to be the delimiter between the strings,. You can also use a string prefix and a string suffix.
For example, you can concatenate the strings from the elements firstname and lastname, and specify a space as the delimiter, a prefix of Mr. , and a comma as the suffix, with the following result: Mr. firstname lastname,
The Concat transform takes multiple simple type elements.
You wire inputs to the Concat transform as primary connections.
You can wire the same input into a Concat transform more than once.
The Concat transform concatenates input data in order. The order of inputs into the transform is recognized, and is set in the Order property page.
By default, the order of the inputs to the Concat transform is the order in which you wire the inputs.
You can modify the order by reordering the inputs in the Order tab of the transform properties.
You can define multiple connections between input elements and the Concat transform. You can then use one or more of these input elements in a conditional expression that defines the condition under which the transform is applied. If the condition evaluates to true, the transform is applied.
To define the conditional expression, you can define an XPath expression or a call to a static method on an imported Java™ class. You can also create a complex expression comprising XPath, Java and extension functions such as iib:getUserDefinedProperty("propertyname").
You configure the expression in the Condition tab that is available in the Properties page of the transform.
For more information, see Configuring the properties of a transform, Defining an XPath conditional expression for a transform and Defining a Java conditional expression for a transform.
If your conditional expression requires the value of an input element that is not used in the Concat transform to set the output element, you must use the If transform to define when the transform is applied at run time. For more information, see If, Else if, and Else.
By default, you cannot connect a repeating simple element to a Concat transform. However, if you have a map where you have defined a Concat transform, and you change the cardinality of one of the input elements so it becomes a repeatable simple type, the Concat transform will show a warning.
The warning message is the following:
Each input of the string concatenation function expects a single input. Make sure {0} will not pass multiple instances to the function at run time.
The warning is displayed because at least one input is not of single type.
Example for a repeating single input element to a Concat transform: