The Import CSV extension in NocoDB allows users to import data from CSV files directly into existing tables. This tool enables you to efficiently add new records, update existing ones, and map CSV columns to NocoDB fields with precision.
The Import CSV Extension supports two modes of data import:
**1. Add Records**: Import all records from the CSV file as new entries in the selected table. No existing records are modified.
**2. Merge Records**: Update existing records based on a designated **merge field** (a unique field used for matching) while optionally adding new records. The available options under this mode are:
- Adds new records and updates existing ones as needed, based on the merge field.
**Merge Field:** The merge field is the key field used to match records in the CSV file with those in the NocoDB table for updating purposes. Typically, this is the Primary Key or another unique identifier. Composite keys are not supported.
**Field Mapping:** Easily map CSV columns to corresponding fields in the NocoDB table. You have the flexibility to import only the fields you need.
### Steps to Import
Follow these steps to import data from a CSV file into NocoDB:
1. Drag and drop or upload your CSV file into the Import CSV Extension area.
2. Select the table you want to import the data into. By default, current active table is selected.
3. Choose the mode of import:
- **Add Records** or
- **Merge Records** with one of the following **Import Types**:
- *Create New Records Only*
- *Update Existing Records Only*
- *Create and Update Records*
4. Set the **Merge Field** (for Merge Records mode): Select the field that will be used to match CSV records with existing table records.
5.**Use first record as header**: If the first row of the CSV file contains the column headers, enable this option to use them as the field names.
6. Map the columns from the CSV file to the corresponding fields in the NocoDB table.
7. Click the **Import** button to start the import process.