Import a CSV into an existing table
Preview a CSV, map its columns to existing fields, and add records to the right table.
Prepare the CSV
You need access to Database Manager, permission to import, and permission to create records in the destination table. Use one header row with distinct column names and one record per row. For a first test, use a small file with fictional records.
If you’re starting with an Excel workbook and need a new table, follow Create tables from an Excel workbook.
For the Customer tracker example, save this as customers.csv.
Title,Contact email,Follow-up date
Example Studio,[email protected],2026-12-03
Sample Workshop,[email protected],2026-12-04
Upload and map the columns
- In Settings → Database, find the destination table in the sidebar. Open its Actions for [table name] menu and select Import. Verify that the name in the import window matches your table.
- In Upload, drop the CSV onto the window or select the upload area to browse for it.
- In Preview, check that the header and sample values appear in separate columns. If they don’t, check that your export uses the same delimiter on every row before moving on.
- In Mapping, match each source column to its destination field. This import uses fields that already exist. Skip unwanted columns, and make sure you map the fields needed to create a record.
- For the example, choose Insert new records (append) to add the rows. Update existing + insert new (upsert) uses the selected match fields to identify records to update. Replace all data deletes the table’s existing records before importing, so check the mode before confirming.
Review automatic column matches and the mapped column count
Match existing records
In Update existing + insert new (upsert) mode, map a stable identifier such as Customer code and select it under Identify records by. A matching row updates the existing record. A row with no match creates a record.
If customer codes repeat across regions, map and select both Region and Customer code. Every row needs a value in both fields. Each pair must occur only once in the CSV and identify at most one record in the destination table. If the import reports a missing or ambiguous match, correct the source values or choose fields that identify a single record.
Verify the import
- In Confirm, check the destination, column selections, and mode, then start the import.
- Wait for the result. Compare the imported row count with your file and review any reported errors.
- Open the destination table and spot-check a few records. If the new rows don’t appear, check the current view’s filters.
If Mainbase reports errors or the result is unclear, check what saved and prepare a safe retry before importing the file again.
If someone sent you a File deposit link, see Upload a file from a deposit link.
Import a JSON file as records in a new table
Prepare and verify decimal values in a CSV import
Import multiple select choices from a CSV
Prepare and verify dates in a CSV import
Keep or clear existing field values in a CSV update
Replace all rows in a table from a CSV
Cancel a running CSV import and check what saved
Fix shifted or combined columns in a CSV import
Preserve leading zeros in identifiers during a CSV update
Import checked and unchecked values from a CSV
Ask Mainbase AI
Ask about any feature in Mainbase. Find a setting, get step-by-step guidance, or troubleshoot a problem.
Open the AI assistantCopy a question to get started
- How do I create a Kanban view?
- How do I invite a teammate?
- Why is a record missing from this view?