> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wisdom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Work with CSV Files

With WisdomAI, you can integrate and analyze data stored in **CSV**, **TSV**, or **Excel** files. Depending on your goals and permissions, there are three distinct ways to work with these files:

1. [Add Data to a Domain (Admins)](#1-add-data-to-a-domain-admins)
2. [Create a Private Domain (Admins)](#2-create-a-private-domain-admins)
3. [Attach CSV as a Chat File (Admins/Explorers)](#3-attach-csv-as-a-chat-file-admins%2Fexplorers)

## 1. Add data to a Domain (Admins)

Admins can add new CSV files as tables or replace existing tables within a shared domain. This change affects the domain-level schema, meaning every Explorer assigned to that domain can query this data. Use this option to make a dataset available to your entire team.

Follow the steps below to add data to a domain:

1. Navigate to **Domains** and select your target domain.
2. Click the **Data Sources** tab.
3. Click **Add Table** > **from CSV file**.

<img src="https://mintcdn.com/wisdomai/uHRJ9Gl6FvaEts3X/images/create_table_from_csv_domain01.png?fit=max&auto=format&n=uHRJ9Gl6FvaEts3X&q=85&s=0575feb384ff9601487f6206eea3d273" alt="Create Table From Csv Domain01" width="1920" height="922" data-path="images/create_table_from_csv_domain01.png" />

4. The domain will come set by default, while you will be able to select the **Table Operation**:
   * **Add as a new CSV Table**: Creates a fresh table within the selected domain.
   * **Replace an existing CSV Table**: Updates the data of a specific table while preserving settings.
5. If replacing data, select the specific table to be replaced from the **Select table to replace** dropdown.

   <img src="https://mintcdn.com/wisdomai/2xTB7W5L94i87tM4/images/upload-csv-0301.png?fit=max&auto=format&n=2xTB7W5L94i87tM4&q=85&s=18b7b8df0d546df3a5a5f88e2a666bc3" alt="Upload CSV dialog with 'Replace an existing CSV table' selected, a dropdown to choose the table to replace, and a confirmation state indicating the CSV file is ready for upload" width="933" height="704" data-path="images/upload-csv-0301.png" />
6. Drag and drop your file into the upload area or click to browse.
7. Click **Continue**.

<img src="https://mintcdn.com/wisdomai/2xTB7W5L94i87tM4/images/upload-csv-0401.png?fit=max&auto=format&n=2xTB7W5L94i87tM4&q=85&s=1bf4246883e6cfef74a86e53bfc27263" alt="Upload Csv 0401" width="925" height="604" data-path="images/upload-csv-0401.png" />

8. **Configure Columns**: Review the detected column types (e.g., String, Integer). You can unmark the checkboxes to exclude specific columns from the upload.
9. Click **Preview**.

<img src="https://mintcdn.com/wisdomai/2xTB7W5L94i87tM4/images/upload-csv-09.png?fit=max&auto=format&n=2xTB7W5L94i87tM4&q=85&s=d73dda65ba57388e364725247bdfed81" alt="Upload Csv 09" width="1591" height="831" data-path="images/upload-csv-09.png" />

10. Ensure the data in the preview grid maps correctly. Click **Create table** (or **Replace table** if updating an existing one).

<Info>
  **Data Replacement Behavior**

  When you replace an existing CSV table, the system updates only the raw data. All existing column descriptions, settings, and domain configurations remain intact, only the table data itself is replaced.
</Info>

<img src="https://mintcdn.com/wisdomai/2xTB7W5L94i87tM4/images/upload-csv-10.png?fit=max&auto=format&n=2xTB7W5L94i87tM4&q=85&s=4025471c53485820efd60303bfe6ebaf" alt="Upload Csv 10" width="1586" height="833" data-path="images/upload-csv-10.png" />

## 2. Create a private Domain (Admins)

Admins can create their own domains by uploading a file. These domains are private by default, and no other user can see them unless the creator explicitly shares them. This method is great for one-off analysis or testing a dataset before sharing it.

Follow the steps below to create a domain from the domain switcher:

1. Navigate to the **homepage**.
2. Click the **domain switcher**.
3. Select the **Upload CSV file...** option.

<img src="https://mintcdn.com/wisdomai/82xgEVWUP7cwhDHG/images/upload-csv-01.png?fit=max&auto=format&n=82xgEVWUP7cwhDHG&q=85&s=dda5e928e9a02ea705b9244dde1cc4b1" alt="Image showing the Upload CSV option" width="1446" height="898" data-path="images/upload-csv-01.png" />

4. In the **Upload CSV or TSV file** modal that opens, leave the default option **+ Create a New Domain with this CSV** selected.
5. Upload your files and click **Continue**.

<img src="https://mintcdn.com/wisdomai/70gtRoTkw2KqPkV0/images/upload-csv-method2-01.png?fit=max&auto=format&n=70gtRoTkw2KqPkV0&q=85&s=a1f72009ee0885e286fa8362c284d678" alt="Upload CSV modal window with the Continue button highlighted" width="945" height="740" data-path="images/upload-csv-method2-01.png" />

6. The **Preview CSV file** modal window opens. Click **Configure columns** to continue.

<img src="https://mintcdn.com/wisdomai/70gtRoTkw2KqPkV0/images/upload-csv-method2-02.png?fit=max&auto=format&n=70gtRoTkw2KqPkV0&q=85&s=f71485b15c99b881169282a42444280a" alt="Preview CSV file modal window with the Configure columns button highlighted" width="1591" height="823" data-path="images/upload-csv-method2-02.png" />

7. The **Configure CSV file** modal opens, displaying a preview of all columns detected in your CSV file.

By default, basic configuration options are shown. To access additional controls, switch the **Show advanced options** toggle **ON** (top-right corner of the modal).

<Tip>
  Check the expandable section below to review all available advanced options and their descriptions.
</Tip>

<Expandable title="Advanced configuration options">
  Advanced options let you control identifiers, ordering, allowed values, and lookup behavior used during analysis.

  * **Primary key**: Marks a column as uniquely identifying each row.
  * **User identifier**: Identifies columns that represent individual users or customers.
  * **Allowed values**: Restricts the column to a defined set of values.
  * **Order allowed values**: Defines a logical order for categorical values.
  * **Default order**: Sets the default sort order for the column.
  * **Enable lookups**: Allows the column to be used for grouping, filtering, and comparisons.

  Review and adjust the column settings as needed.
</Expandable>

8. When you’re done configuring the file, click **Start asking questions**. A chat opens where you can immediately begin querying your data.

<img src="https://mintcdn.com/wisdomai/70gtRoTkw2KqPkV0/images/upload-csv-method2-03.png?fit=max&auto=format&n=70gtRoTkw2KqPkV0&q=85&s=3c7799f0e4f72ace5157395fe6193587" alt="Upload Csv Method2 03" width="1598" height="826" data-path="images/upload-csv-method2-03.png" />

## 3. Attach CSV as a chat file (Admins/Explorers)

You can upload a file directly into a chat session. While the chat still uses your active domain for general context, the AI will prioritize the data in your uploaded file for that specific conversation. This upload method allows you to ask quick questions about a specific file without creating a new domain.

Follow the steps below to attach a file to a chat:

1. Open any Chat.
2. Click the **Attachment (paperclip)** icon in the message bar.
3. Upload your file.

<Tip>
  You can add multiple files and compare them.
</Tip>

4. Ask questions immediately (e.g., "Summarize the trends in this file").

<img src="https://mintcdn.com/wisdomai/uHRJ9Gl6FvaEts3X/images/attach-files-chat.png?fit=max&auto=format&n=uHRJ9Gl6FvaEts3X&q=85&s=23ad6bd92998127f6f922cb3b21086a6" alt="Snippet showing the attach files to chat button" width="1641" height="922" data-path="images/attach-files-chat.png" />

<Note>
  See [Supported File Types](/improve-wisdom-ai-responses/attach-files-to-chat#supported-file-types) for a complete list.
</Note>

## Next steps

<CardGroup cols={3}>
  <Card title="Advanced Data Modeling" icon="sitemap" href="/setting-up-wisdom-ai/advanced-data-modeling-creating-context">
    Define relationships and context in your data to enable more powerful analysis.
  </Card>

  <Card title="Validate and Test Answers" icon="check-double" href="/improve-wisdom-ai-responses/validate-and-test-answers">
    Understand the methods for verifying the correctness and reliability of generated answers.
  </Card>

  <Card title="Enhance Analysis with Business Knowledge" icon="lightbulb" href="/improve-wisdom-ai-responses/enhancing-data-analysis-with-custom-business-context">
    Improve analysis by providing custom business definitions, synonyms, and other contextual information.
  </Card>
</CardGroup>
