---
schema_version: "1"
id: abe0785bf3db527bb4a922daf540de21ac2297a3ff2325c35708a38ca4309ba4
title: Define Input and Output Structure of a Transformation (Anypoint Studio)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-runtime/4.9/transform-input-output-structure-transformation-studio-task.md
canonical_url: https://docs.mulesoft.com/mule-runtime/4.9/transform-input-output-structure-transformation-studio-task
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 0f907b342b27a8ee3fe3ca1b6d34a6817e1166049db94dc35193b6dae6075ab1
description: MuleSoft Documentation Site
release: "4.9"
latest: false
---
---
product: Mule Runtime
version: 4.9
---

# Define Input and Output Structure of a Transformation (Anypoint Studio)

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

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.

## Define Data Structure on Other Components

1.  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.

2.  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.

## Define Data Structure in Transform Message Component

1.  Right click on the root of the input or the output tree, then select Set Metadata.

2.  Manually define the data structure.

## Define Data Structure Via XML

See [DataWeave XML Reference](https://docs.mulesoft.com/mule-runtime/4.9/transform-dataweave-xml-reference).

## Reader Configuration

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**

  ![A Reader Configuration in the Transform Message component](/mulesoft/current/en-us/mule-runtime/4.9/_images/dw-reader-configuration-select.png)

  > [!NOTE] 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:

- [CSV](https://docs.mulesoft.com/dataweave/latest/dataweave-formats#csv)

- [XML](https://docs.mulesoft.com/dataweave/latest/dataweave-formats#xml)

- [Flat File](https://docs.mulesoft.com/dataweave/latest/dataweave-formats#flat-file)

> [!NOTE] You can also add this information through properties in the XML source of your Mule
> project.

## Writer Configuration

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:

- [CSV](https://docs.mulesoft.com/dataweave/latest/dataweave-formats#csv)

- [XML](https://docs.mulesoft.com/dataweave/latest/dataweave-formats#xml)

- [JSON](https://docs.mulesoft.com/dataweave/latest/dataweave-formats#json)

- [Flat File](https://docs.mulesoft.com/dataweave/latest/dataweave-formats#flat-file)

## See Also

[Workflow: Create a Mapping through the Anypoint Studio UI](https://docs.mulesoft.com/mule-runtime/4.9/transform-workflow-create-mapping-ui-studio)

[Transform Message Component](https://docs.mulesoft.com/mule-runtime/4.9/transform-component-about)

[DataWeave Language](https://docs.mulesoft.com/mule-runtime/4.9/dataweave)

[DataWeave Types](https://docs.mulesoft.com/dataweave/latest/dataweave-types)

[Supported Data Formats](https://docs.mulesoft.com/dataweave/latest/dataweave-formats)

[DataWeave XML Reference](https://docs.mulesoft.com/mule-runtime/4.9/transform-dataweave-xml-reference)
