2.9 KiB
title | description | tags | keywords |
---|---|---|---|
Import CSV | Import data from CSV files into NocoDB | [Extensions Import CSV Data Import Data] | [Import CSV Import data CSV import Data import CSV files] |
Overview
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.
Importing Data
Modes of Import
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:
- Create New Records Only
- Only adds new records from the CSV. Existing records are not updated. New records are identified based on the merge field specified.
- Update Existing Records Only
- Only updates records that already exist in the table based on the merge field. New records are not added.
- Create and Update Records
- 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:
- Drag and drop or upload your CSV file into the Import CSV Extension area.
- Select the table you want to import the data into. By default, current active table is selected.
- 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
- Set the Merge Field (for Merge Records mode): Select the field that will be used to match CSV records with existing table records.
- 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.
- Map the columns from the CSV file to the corresponding fields in the NocoDB table.
- Click the Import button to start the import process.
Post-Import Summary
Once the import is complete, NocoDB will display a summary detailing:
- The number of new records added
- The number of existing records updated
- Any records left unchanged
This streamlined process ensures your data is imported accurately and efficiently.