Defining Input and Output Structure of a Transformation
To use the graphical view and construct mappings via drag and drop, the Transform Message component first needs information about what fields are available for dragging and dropping onto.
If you plan to create your transformation entirely by writing DataWeave code, you can skip defining input and output and reference elements directly.
Make sure that all other elements in the flow are fully configured.
When input and output of a component can be predicted based on its configuration, these are exposed to the rest of the flow. For example, when a Salesforce connector is configured to carry out a specific operation, its output structure is known and exposed.
If input or output of certain components can’t be predicted, manually define the output and input of key components via their Metadata Tab.
For example, an HTTP listener might receive requests containing any payload.
Right click on the root of the input or the output tree, then select Set Metadata.
Manually define the data structure.
In case your input needs to be parsed in a special way, you can set up certain properties for the reader object. Each input format has different configurable properties, or none. There are two ways to set these listed below.
Configure other components on the flow, by accessing their corresponding Metadata tab.
On the Transform Message component, right click on the root of the input pane and select Reader Configuration
This option only exists if the selected data type format allows for configurable reader properties. If the payload is of type
unknown, you must change its type first.
For a detailed reference of what properties can be set in the Reader Configuration of each format, see the corresponding reader properties section:
|You can also add this information through properties in the XML source of your Mule project.|
In case your output needs to be constructed in a special way, you can set up certain properties of the writer object. Each output format has different configurable properties, or none.
These properties must be written on the
%output directive of your DataWeave code.
For a detailed reference of what properties can be set in the Writer Configuration of each format, see the corresponding reader properties section: