> For the complete documentation index, see [llms.txt](https://documentation.panomics.bio/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.panomics.bio/documentation/samples/sample-metadata.md).

# Sample Metadata

While in the `annotating` status, metadata can be applied to the samples based on the metadata structure defined at the organization level. [Learn more about creating metadata fields here.](/documentation/administration/metadata-fields.md)

Metadata can be applied to samples using the built-in grid editing system, or by uploading a metadata file (csv format). Adding metadata does not require a [Standard Compute](/documentation/compute-runtimes/codeless-compute.md) runtime, but merging it onto the samples when transitioning them to the `ready` status does.

## Editing the metadata from the UI

Double click on a cell to fill in the corresponding information. Depending on the metadata field type, the input field differs:

* string - free text
* numeric - required numeric input
* list - select one of the available options
* ontology - autocomplete - type and select

Once all metadata was applied, click the `Commit` button in the grid toolbar to submit the data to the server. While editing, all data is stored in the browser. Rows with unsaved information are colored in orange. To revert changes to an unsaved sample, select the row and click the `Revert` button in the grid toolbar.

{% embed url="<https://www.loom.com/share/21397fa916cd4a939b90cb62b8fac66b?sid=da50234f-8e45-4365-a6fa-f2f68aaeac9d>" %}
Edit sample metadata
{% endembed %}

## Uploading metadata using a CSV file

For large studies, manually inputting the metadata may not be feasible. Simply upload a metadata file by clicking the `Upload Metadata` button in the grid toolbar.

{% hint style="info" %}
The metadata file's header must match the metadata field names defined at the organization level and must include the field marked as "sample identifier" in the metadata fields management area.
{% endhint %}

**Example metadata file:**

<figure><img src="/files/Bzzl0kOCEfbpzXm1Y5bD" alt=""><figcaption><p>Metadata file screenshot</p></figcaption></figure>

{% file src="/files/AR3YVGMySyLa3fQoiTbP" %}

In this example, the column `sample.id` refers to the sample names. Data matching is performed based on this information.

{% embed url="<https://www.loom.com/share/7a7dacf177b94dc98c44c37a490aa403?sid=abbaef61-bd18-4ac2-ab90-664b6a7562c9>" %}
Upload a sample metadata file
{% endembed %}

{% hint style="info" %}
Once the metadata is successfully added, the samples can be marked as ready. This action requires a Standard Compute runtime.&#x20;
{% endhint %}
