Import brings the contents of a file you prepare on your machine into a model as its content. One piece of data in the file becomes one item, and you write the values in CSV, JSON, or GeoJSON format.
Match the file’s column and key names to the field key, not to the field’s display name.
Reference and Group fields are not imported even when you write them in the file. Geometry fields and fields that hold multiple values cannot be handled in CSV, so use JSON or GeoJSON for them.
An import fails in the following cases. When even one of them applies, none of the items in that file are imported.
- The column or key of a required field is not in the file. When that field has a default value set, the default value goes in.
- The value of a required field is empty. An empty cell in CSV is treated as an empty value, and the default value does not go in.
- A value does not match the format.
How to write the file, and the limits for one import, are in Import / Export.
Import content from a file
Section titled “Import content from a file”Imports a model’s content from a file on your machine.
The Import content screen has a template link for each of CSV, JSON, and GeoJSON. A template is a sample of how to write the file; it is not built to match the model’s schema.
- Under Models on Content, choose the model you are importing into.
- Click the more actions icon (vertical …) next to the model name heading and choose Import.
- On the Import content screen, select a file or drag and drop it. You can select only one file.
- The file starts being checked. When the check finishes, the Import content screen closes and the upload status appears at the bottom right of the screen.
- In the upload status, an import is done when the file’s row gets a green check. A failed file shows a red icon and the reason.
- On the Content screen, check that all the items were imported.
The status of imported items is Draft. The steps for making them visible from outside are in Publish and unpublish an item.
Import processing continues even when you move to another screen. In the upload status at the bottom right of the screen, you can do the following.
- Minimize: makes the display smaller.
- Close: closes the display and cancels every import in progress.
- Cancelling a file: stops the import of that file only.
- The retry icon: retries cancelled and failed files.
Import in the menu can be operated when a model with one or more fields is selected and your role can create items (Owner, Maintainer, or Writer). When either of these two is not met, it cannot be operated, and the reason is shown on the menu item.
Fix the errors and import again
Section titled “Fix the errors and import again”When the file’s column and key names or its value types do not match the schema, the Import content screen switches to a list of errors.
- Check what does not match in the Location and Detail table. You can save the same contents to a file with Download error log.
- Fix the file on your machine.
- Click Back to return to file selection, and select the fixed file again.