Mapping Flow Input and Output Properties
DataMapper will continue to be fully supported in all current and future versions of Mule ESB 3.x, however it will be removed in Mule 4.0 in favour of the Transform Message component (based on DataWeave code). We recommend that if you wish to take advantage of the new capabilities of DataWeave or if you start new projects, upgrade now. A migration tool is now included in Studio, which assists in converting a DataMapper map to DataWeave. Right click on a DataMapper, select Migrate to DataWeave, and follow the instructions. If you don’t see DataMapper on your palette, you can enable it by going to Preferences → Anypoint Studio → Palette Profiles and ticking the checkbox Show deprecated Mule Components and Attributes. |
For many of the input and output data types supported by Anypoint DataMapper, there are advanced options you can set to control important aspects of how DataMapper receives and interprets data from its defined input, and how it delivers data to its defined output. Mostly these are character encoding settings and error handling policies, but each data format has its particularities. These can only be set after the metadata has been defined and the DataMapper is open in the Mapping Flow Editor.
Accessing Input and Output Properties
To access the properties for the input or output group, in the Input or Output pane of the Mapping Editor view, click the cog to open the Properties dialog.
The specific dialog depends upon the type of input or output data.
All data types expose an input property Error Policy, that is used to specify how to handle bad input data in the mapping. For the semantics of Error Policy, see DataMapper Input Error Policy for Bad Input Data. |
The other properties available depend upon the specific input or output data type.
CSV Input and Output Properties
The input and output Properties for CSV are summarized in the following table:
Property | Input, Output or Both | Description |
---|---|---|
Delimiter |
Both |
The delimiter to use. You can change the delimiter or add a custom delimiter. |
Encoding |
Both |
The character encoding of the input or output file |
Quote Strings |
Both |
Fields that contain a special character (the delimiter, newline, or a single or double quote) must be enclosed in single or double quotes. If true, special characters inside the quoted string are not treated as delimiters, and quotes around the field are removed. |
Trim |
Input |
Whether to remove leading and trailing whitespace from input fields before the data is assigned to a Mule Flow input. |
Rows to ignore |
Input |
Number of rows to skip. Useful for skipping header rows. |
Error Policy |
Input |
How to handle bad input data. See DataMapper Input Error Policy for Bad Input Data for details. |
Excel Input and Output Properties
There are no additional output properties properties for MS Excel data. The input properties are described in the following table:
Property | Input, Output or Both | Description |
---|---|---|
Sheet |
Input |
Name or number (zero-based) of sheet(s) to be read. You can specify multiple sheets, separated by semicolons, or use ? and * wildcards to specify multiple sheets. Sheets are read sequentially, one after another, into the same mapping. |
Error Policy |
Input |
How to handle bad input data. See DataMapper Input Error Policy for Bad Input Data for details. |
Fixed Width Input and Output Properties
The input and output properties for fixed width data are described in the following table:
Property | Input, Output or Both | Description |
---|---|---|
Encoding |
Both |
The character encoding of the input or output data |
Quote Strings |
Both |
Fields that contain a special character (the delimiter, newline, or a single or double quote) must be enclosed in single or double quotes. If true, special characters inside the quoted string are not treated as delimiters, and quotes around the field are removed. |
Trim |
Input |
Whether to remove leading and trailing whitespace from input fields before the data is assigned to a Mule Flow input. |
Rows to ignore |
Input |
Number of rows to skip. Useful for skipping header rows. |
Print Headers |
Output |
Whether to print column headers. |
Error Policy |
Input |
How to handle bad input data. See DataMapper Input Error Policy for Bad Input Data for details. |
JSON Input and Output Properties
The input and output properties for JSON data are described in the following table:
Property | Input, Output or Both | Description |
---|---|---|
Encoding |
Both |
The character encoding of the input or output data |
Set Null Values |
Output |
Whether to set null values for keys where no value is assigned by DataMapper. If false, no value is defined for such keys; if true, a value is defined and set to null. |
Error Policy |
Input |
How to handle bad input data. See DataMapper Input Error Policy for Bad Input Data for details. |
Key-Value Map Input and Output Properties
The properties available for key-value maps are described in the following table.
Property | Input, Output or Both | Description |
---|---|---|
Set Null Values |
Output |
Whether to set null values for keys where no value is assigned by DataMapper. If true, a key is inserted and the value is set to null. If false, no key is inserted. |
Error Policy |
Input |
How to handle bad input data. See DataMapper Input Error Policy for Bad Input Data for details. |
POJO Input and Output Properties
The properties available for POJO input and output are described in the following table.
Property | Input, Output or Both | Description |
---|---|---|
Error Policy |
Input |
How to handle bad input data. See DataMapper Input Error Policy for Bad Input Data for details. |
Binding Definition |
Output |
For output POJOs, if the POJO is defined as an abstract class or interface, you can specify a concrete class to bind to when instantiating the POJO; you can also specify a factory class for instantiating the POJO. See Bindings and Factories for details. |
Factory Definition |
Output |
XML Input and Output Properties
The properties available for XML input and output are described in the following table.
Property | Input, Output or Both | Description |
---|---|---|
Encoding |
Both |
The character encoding for the XML data. |
Error Policy |
Input |
How to handle bad input data. See DataMapper Input Error Policy for Bad Input Data for details. |