---
schema_version: "1"
id: b38d245b61221eaa76b7cb4a2fd407287ca25060871863e7d117506f191fe6a7
title: Create a Metadata Class
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/studio/create-metadata-class-task.md
canonical_url: https://docs.mulesoft.com/studio/create-metadata-class-task
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 089080dfcb33814847e67d81d5c149116e33e0cc377b65f42d80dc3e7aacd9dc
description: MuleSoft Documentation Site
latest: true
---
---
product: Studio
---

# Create a Metadata Class

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

Create a metadata class in the Metadata Editor to define the structure of your data in Anypoint
Studio. Depending on the data format, you define the structure from a sample, a schema, or a
built-in editor.

1.  Click the Add button in your Metadata Editor.

    ![Add button highlighted in the metadata editor window](/mulesoft/current/en-us/studio/_images/dw-define-type2.png)

2.  Type in an ID for the new metadata type and click Create Type.

3.  Select a data format using the type dropdown list in your Metadata Editor.  
    If the type of your data is undeclared or not understood, the type default to
    `application/java`, and a warning is logged.

Depending on the selected option, there are different ways to define the data structure. With some
formats, the structure can be inferred from an example, others require a schema. For some schemas, a
built-in editor UI is available.

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Format</th><th>Sample</th><th>Schema</th><th>Editor</th></tr></thead><tbody><tr><td><div><div><p>JSON</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p>XML</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p>Java</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p>CSV</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p>Fixed Width</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p>Copybook</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p>Flat File</p></div></div></td><td><div><div><p>No</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p>Simple</p></div></div></td><td><div><div><p>No</p></div></div></td><td><div><div><p>No</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p>Excel</p></div></div></td><td><div><div><p>No</p></div></div></td><td><div><div><p>No</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr></tbody></table>

## See Also

- [Metadata Editor](https://docs.mulesoft.com/studio/metadata-editor-concept)
