# Metadata sources for Transform Message

*MuleSoft Platform Integration Architect Study Guide · Designing and developing Mule applications · Last updated November 13, 2026 · https://www.certifyforce.com/study-guide/mulesoft-platform-integration-architect/designing-and-developing-mule-applications/metadata-sources-for-transform-message*

Where Transform Message gets its input and output structures (DataSense from connectors, Metadata Editor types from samples, schemas or the built-in editor, and preview-only sample data), and where metadata should and should not be declared.

- Certification: Salesforce MuleSoft Platform Integration Architect
- Exam section: Designing and developing Mule applications
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-platform-integration-architect

**Official exam objective:**

> Select and use the available sources of metadata in the Transform Message component.

## What the exam expects

- Select the right metadata source for a Transform Message mapping: DataSense from a connector, a Metadata Editor type, or sample data.
- Keep DataSense working when a connector query is dynamic.
- Know which formats a Metadata Editor type can be built from a sample, a schema or the built-in editor.
- Declare metadata where it belongs (flow and subflow contracts) and not where it masks real types (Transform Message output).
- Shape input metadata with Set Metadata, including a list of a single-record structure.

**DataSense:** the Studio feature that acquires Mule event metadata automatically while you design. **Metadata Editor:** the Studio editor that defines payload, attribute and variable metadata. **Metadata type:** a named structure built from a sample, a schema or an editor. **Sample data:** input values typed into a Transform Message to drive its preview ([DataSense](https://docs.mulesoft.com/studio/datasense-concept), [Metadata Editor](https://docs.mulesoft.com/studio/access-metadata-editor-task)).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Transform Message metadata sources | Connectors, schemas and sample data | [Transform Message](https://docs.mulesoft.com/studio/transform-message-component-concept-studio) |
| DataSense origin | Working connection to the connector's resource | [DataSense](https://docs.mulesoft.com/studio/datasense-concept) |
| Dynamic Select query | Use `default` in the interpolation so design time can resolve it | [Select](https://docs.mulesoft.com/db-connector/latest/database-connector-select) |
| Sample data scope | Preview of that component only; not propagated, not a runtime default | [Preview](https://docs.mulesoft.com/studio/preview-transformation-output-studio-task) |
| Flat File / Excel types | Schema only / built-in editor only | [Metadata class](https://docs.mulesoft.com/studio/create-metadata-class-task) |
| Undeclared format | Defaults to `application/java` with a warning | [Metadata class](https://docs.mulesoft.com/studio/create-metadata-class-task) |
| Transform Message output metadata | Do not declare it; it masks the script's real type | [DataSense](https://docs.mulesoft.com/studio/datasense-concept) |
| Flows and subflows | Must declare their metadata contract | [DataSense](https://docs.mulesoft.com/studio/datasense-concept) |
| Wrap elements in a collection | Turns a structure into a list of its instances | [Metadata Editor](https://docs.mulesoft.com/studio/access-metadata-editor-task) |
| Dynamic metadata in the SDK | Operations and sources only | [DataSense Support](https://docs.mulesoft.com/mule-sdk/latest/metadata) |

## Check yourself

- When a Transform Message writes both the payload and a variable, which output does the Preview pane show?
- Which Transform Message editor mode shows only the input structure beside the code?
- Why can dynamic metadata for an operation's attributes be left out?
- When you want every new Transform Message to open in a particular editor mode, where do you set it?

## Sources

- [Transform Data with the Transform Message Component](https://docs.mulesoft.com/studio/transform-message-component-concept-studio)
- [DataSense: Discover Message Metadata as You Design Applications](https://docs.mulesoft.com/studio/datasense-concept)
- [Access the Metadata Editor](https://docs.mulesoft.com/studio/access-metadata-editor-task)
- [Create a Metadata Class](https://docs.mulesoft.com/studio/create-metadata-class-task)
- [Preview the Output of a Transformation](https://docs.mulesoft.com/studio/preview-transformation-output-studio-task)
- [Query a Database Examples](https://docs.mulesoft.com/db-connector/latest/database-connector-select)
- [Adding DataSense Support](https://docs.mulesoft.com/mule-sdk/latest/metadata)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 5 linked practice questions, and unlimited timed mock exams are included with the MuleSoft Platform Integration Architect pack (USD $19): https://www.certifyforce.com/practice-exams
