Import is available for admins and managers and offers functionality to import data from CSV files. Currently lists can be imported containing:
- GIS data
Automatic imports can be dangerous for data integrity and it may be very time consuming to reverse them so we strongly advise:
- SQL backups before import, an existing backup not older than a day is enforced
- Use the preview (enabled by default) and check if the data looks alright
The import operation is encapsulated in a transaction, meaning if there is an error in the script, nothing will be imported.
- Take a look at the
- Make sure the extension is spelled correctly in lower case e.g. my_data.csv
- In the first line should be the header names
- Each following line is one data set. Values are separated by commas
- Text can be enclosed in double quotes, especially if the contain commas
To retrace imported entities they have to be associated with a project. If there is none (or not the right one) available you’ll have to create a new one. The name and description can be updated later.
Only one class can be imported at a time so you have to choose one of the available classes.
The header can contain following titles. Columns with other titles won’t get imported but shown as an error message.
- name - required, an error will be displayed if the header is missing. A warning will be displayed, if names in data rows are missing and these wont get imported.
- description - a description can be provided
- origin_id - optional but useful to trace it back. It has to be unique per project so if you have multiple like a person and place with id = 1 you can prefix them in the document e.g. person_1, place_1 before importing them
- begin_from - used for dates, see below
- begin_to - used for dates, see below
- end_from - used for dates, see below
- end_to - used for dates, see below
- northing - only available for places, see below
- easting - only available for places, see below
Dates can be entered in the format YYYY-MM-DD in the fields begin_from and end_from. You can also use time spans in combinations with the fields begin_to and end_to, see: Date
- If the date format is incorrect they will be displayed in red and won’t be imported
- Missing values for time spans will be discarded silently, e.g. a valid value in begin_to but an empty value in begin_from
- There are no advanced checks between dates e.g. end dates can be before begin dates. You should check them after the import at Data integrity checks
- File - select the file you’ll want to import
- Preview - if this option is selected, nothing will be imported and you see a preview
- Check for duplicates - if selected the chosen class e.g. person will be searched for already existing names. The search is not case sensitive e.g. “King Arthur” would be found even it is spelled “KiNg ArThUr”. If duplicates are found a warning is printed but this doesn’t stop the import so check it before with the preview.
After the import¶
When the import went through you’ll see a summary which data was imported (like the preview). Also you can browse the projects to see which imported entities are associated with them. If you enabled the advanced layout you can also see in the detail view of an entity from which project it was imported, which user did the import and the origin_id value.