# Stacker Tables: Import a CSV

### **Import a CSV to create a new table**

1. Click<img src="/files/xCkvVa1dO3F7n6fTHS3C" alt="" data-size="line">**Manage fields and data**&#x20;
2. Click the plus icon
3. Click **Add a new table**&#x20;
4. Select **Import from CSV**
5. Select the file and upload

{% hint style="warning" %}
It is important that your header is located in the top row of your CSV file.
{% endhint %}

{% embed url="<https://app.arcade.software/share/A6PPjXkFjmdzCUnxoFOz>" %}

### **Import a CSV into an existing table (Beta)**

{% hint style="info" %}
This feature is currently in limited release and must be enabled by a Stacker team member
{% endhint %}

1. Navigate to the intended target in the Data Grid
2. Click **Import**
3. Upload your CSV
4. After upload, there will be an automatic validation check to ensure your data is formatted correctly for import
5. If the check fails, the errors will be displayed and you will not be able to proceed
6. If the validation check passes, click **Start Import**
7. Once the import is completed, you will see a summary of the actions completed

#### How does the import work?

We import data using an upsert method. This means records are either created or updated depending on if a valid reference to an existing record is found.

#### How do I structure the CSV file?

The column header values in the CSV should map onto the developer names of the fields in the table you are importing in to.

{% hint style="info" %}
Find the Developer name by going to **Manage fields and data**, select **Fields**, select "**Show Developer Names"**
{% endhint %}

You can also use the column header "\_sid" to provide a target record to be updated using the Record ID.

Values for multi-value fields such as Multiple Select and Link to Multiple Records can be provided in comma-separated format.

{% hint style="info" %}
Linked records use the **Record ID**. This can be found by creating a **Record ID** field in the table.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stackerhq.com/stacker-astra/data-management/import-data-to-stacker-tables/stacker-tables-import-a-csv.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
