Import records from CSV
Upload a CSV and map its columns to schema fields.
Last updated
Upload a CSV and map its columns to schema fields.
Where: Database β Imports β Import Β· /projects/<project>/db/imports/new
Screenshot TODO β capture comes from testing-plan area 05-imports.
This page shows a worked example of the mapping step of the import wizard.
A CSV with the header row email,first name,salary,hired into an Employees collection with fields email, firstName, salary, hiredOn:
email
email (auto-matched)
Header equals the field name.
first name
firstName (picked by hand)
Names differ, so no auto-match.
salary
salary, Don't import on error checked
A malformed number should send the whole row to errors.txt.
hired
Don't import
The collection tracks hiredOn from another source.
After the run, the import (imp_β¦) reports rows imported vs. rows in the file, and every rejected row lands in errors.txt with its validation error.
A CSV column can map to string (including email, URL, HTML formats), number, integer, currency, boolean, date, select (enum), and tags fields. File, geolocation, and taxonomy/collection/user/role reference fields cannot be filled from a CSV import.
Endpoints: Database.
Last updated