# CSV Import

## Steps to upload new tables

1. Click on <mark style="color:blue;">**Upload CSV**</mark>, then <mark style="color:green;">**Upload New File**</mark>

<figure><img src="/files/4YXUvBaEZmRwf52r4BYo" alt="" width="338"><figcaption></figcaption></figure>

{% hint style="warning" %}
Required format for CSV Upload:

* The table needs to contain at least one <mark style="color:blue;">**ID**</mark> column and one <mark style="color:blue;">**Date**</mark> column;
* ID column needs to contain **unique** values only;
* Column names need to be **unique** and contains **alphabet letters or numbers only** (Vietnamese letters are also applicable);
* Date format must be in <mark style="color:green;">**YYYY-MM-DD**</mark>.&#x20;

If you wish to create numerical metrics, you need to make sure that the columns are formatted with <mark style="color:blue;">**`Number.`**</mark> If there are **`Null`** or **`Blank`** cells in the metric columns, please fill them with number "0".
{% endhint %}

2. Indicate the ID column, then review the file and click <mark style="color:blue;">**Upload to Presight**</mark>.

<figure><img src="/files/yuRIJCvhbdd5b3s3vyxs" alt=""><figcaption></figcaption></figure>

3. After successfully uploading, you can view your new table and dimensions from the table at <mark style="color:blue;">**Data Hub**</mark>.
4. Join the **Date column** of your transactional tables to **Date column** of <mark style="color:blue;">**Presight's Dimdates table**</mark>. Then, you can start creating metrics.

{% hint style="info" %}
Instructions for joining with the <mark style="color:blue;">**Dimdates table**</mark>, creating metrics and editing dimensions in the documentations below:
{% endhint %}

{% content-ref url="/pages/hQV29qmxNNGHDfuEV4cW" %}
[Dimensional Dates (Dimdates table)](/presight-v1.0/data-in/connect/data-connectors/dimensional-dates-dimdates-table.md)
{% endcontent-ref %}

{% content-ref url="/pages/webdopx9Iz6EI8PtAhh3" %}
[Broken mention](broken://pages/webdopx9Iz6EI8PtAhh3)
{% endcontent-ref %}

{% content-ref url="/pages/RzbK8aina5WkIcCmKGOC" %}
[Create a New Dimension](/presight-v1.0/model/segments-and-custom-segments/create-a-new-dimension.md)
{% endcontent-ref %}

## Steps to update data for existing metrics with CSV Upload

1. Choose <mark style="color:green;">**Update Data for Existing Files**</mark> .&#x20;

<figure><img src="/files/PIZpo3Bw8ps99Nb35RbL" alt="" width="437"><figcaption></figcaption></figure>

2. ***Select the table you want to update*** and upload the new file to update your existing table.&#x20;
3. At <mark style="color:blue;">**SELECT ID COLUMN**</mark>, choose the same ID column as the existing table, and Presight will notice how many additional new rows and new columns that this new file has.

<figure><img src="/files/eeImuPkjjlxLoUeFu7qc" alt=""><figcaption><p>Notification for new updates</p></figcaption></figure>

{% hint style="warning" %}
Required format for Updating existing metrics:

* Existing ID column, Date Format, Column Name and Column Format in the new table need to be the same as in the existing table.
* If you need to add new columns in the existing table for updating, you need to add them next to existing columns.
  {% endhint %}

{% hint style="danger" %} <mark style="color:red;">**The new table will overwrite all contents of the existing table.**</mark>
{% 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://presight.gitbook.io/presight-v1.0/data-in/connect/data-connectors/csv-import.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.
