---
schema_version: "1"
id: 0f24c57189519627f7185fca522b49a3796c3d066df0ea5ee3e0162170f3892a
title: Transform Data with the Transform Message Component
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/studio/transform-message-component-concept-studio.md
canonical_url: https://docs.mulesoft.com/studio/transform-message-component-concept-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: cf060ef9765708414f34043789aa0d20c91170441b3d89952646869e82f26755
description: MuleSoft Documentation Site
latest: true
---
---
product: Studio
keywords: studio, anypoint, esb, transform, transformer, format, aggregate, rename, split, filter convert, xml, json, csv, pojo, java object, metadata, dataweave, data weave, datamapper, dwl, dfl, dw, output structure, input structure, map, mapping
---

# Transform Data with the Transform Message Component

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

The Transform Message component enables you to perform transformations over the input data it
receives. You can explicitly write out a transformation in DataWeave language, or you can use the UI
to build it through dragging and dropping elements.

You can work with two representations of the same transformation, and any changes done to one are
matched in real time by the other.

![A code snippet that demonstrates the mapping of data from one object to another](/mulesoft/current/en-us/studio/_images/transform-message-component.png)

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td>Graphical View.<br>Two tree views show the expected metadata structures of the input and output, mappings between these are represented through lines. These can be created through drag and drop.</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td>Source Code View.<br>DataWeave code expresses the transformation in full depth, including functions that aggregate, normalize, group, join, partition, pivot and filter data.</td></tr></tbody></table>

The Transform Message component leverages metadata from connectors, schemas and sample data. It
offers you a preview of your output that is built on sample data and is updated in real time as you
make changes to your transformation.

The Transform Message component has three different editor modes:

- **Show Graphics** mode.  
  The Graphical view displays both input and output data structures and a graphical representation
  of the mappings in your transformation. This mode also displays the Source Code view.

  ![A code block that displays JSON objects for buyer data.](/mulesoft/current/en-us/studio/_images/show-graphics-mode.png)

- **Show Source With Trees** mode.  
  The Graphical view displays both input and output data structures without the graphical
  representation of the mappings. This mode also displays the Source Code view.

  ![Here is a code snippet demonstrating how to transform a payload object into a new object with specific buyer data](/mulesoft/current/en-us/studio/_images/source-with-trees-mode.png)

- **Source Only** mode.  
  The Graphical view shows only the input data structure along with the Source Code view.

  ![A code block displaying a payload object with buyer details](/mulesoft/current/en-us/studio/_images/source-code-mode.png)

You can define your default editor mode in the DataWeave preferences:

1.  Navigate to **Anypoint Studio** > **Preferences**.

2.  Under **Anypoint Studio** > **DataWeave**, select the default editor mode

    ![A menu displaying DataWeave preferences](/mulesoft/current/en-us/studio/_images/editor-mode-preference.png)

To improve your experience with the Transform Message component and properly manage your flow’s
metadata, consider the following tips:

- Before creating your mapping, configure everything else on the flow. You can use Datasense to
  improve to expose your transformation’s input and output metadata. See the
  [DataSense](https://docs.mulesoft.com/studio/datasense-concept) article for more information.

- To filter what you see from the input or output structures, click the magnifying glass icon
  ![A magnifying glass icon](/mulesoft/current/en-us/studio/_images/tips-transform-message-ui-studio-69e11.png) at the top of
  either section and then start typing the name of a field.

- Select an element in the output pane to have its corresponding line in the DataWeave code
  highlighted.

- If an input field is mapped to two or more output fields, you can right-click it and then select
  which of the multiple outputs you want to highlight in the DataWeave code.

## See Also

- [Workflow: Create a Mapping](https://docs.mulesoft.com/studio/workflow-create-mapping-ui-studio)

- [Change the Target Output of a Transformation](https://docs.mulesoft.com/studio/change-target-output-transformation-studio-task)

- [Add Another Output Target](https://docs.mulesoft.com/studio/add-another-output-transform-studio-task)

- [Move Transformations to Separate Files](https://docs.mulesoft.com/studio/move-transformations-separate-file-studio-task)

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