Importing Data via the Interface
After creating your custom table, you can import data in order to populate it.
To do so, go to the 'Manage table data' application (Catalog > Data model > Manage table data)
Importing data is also possible with Custom Tables APIs.
Starting an import
Select a table in which you want to import data.
The chosen line will turn green. Click on the 'View' button to access the table.
To start a mass import of data, click on the 'More' button and select 'Import data'.
This action will open a modal window.
You will have to upload an import file containing the data that you want to store in your table.
File format
Your file must follow specific constraints in order to be accepted.
How to prepare the import file ?
- The file must be a CSV file with UTF-8 encoding and semicolons as separator. It must be zipped beforehand.
- Column names in the file must be identical to the technical name of the fields in Actito (case sensitive)
- The order of the columns is not important
- Mandatory columns must be found in the file. Optional ones can be omitted
- Each column must be unique
Click on the 'Download an example' to download an illustration file containing the structure of your table and the expected value type for each column.
You will obtain a practical example of the format expected for this file.
Columns with the technical attributes "creationMoment", "updateMoment" and "id" are ignored during the import.
This means that if you need to carry out a migration of data from one table to another, you can export table data and import them afterward without having to modify the file.
Import parameters
You will consequently need to specify the import parameters, which means defining the behavior of existing records.
- "Creation only": Only lines leading to the creation of a new line are taken into account. You will therefore only add new records to the database.
- "Update only": Only lines that lead to a row update are taken into account. This mode can be used for tables for which a data update is relevant.
- Hybrid mode "Update/Creation": All lines are taken into account. If an existing row is found, it is updated. If no corresponding row is found, a new row is created.
Key attribute
Next, you will have to specify the key parameter:
To do so, you need to select a unique attribute of the Custom Table. It will be used as link key to the data of the imported file.
- The selected attribute must be unique. If is not unique, you will obtain an error message.
If the format of the file is valid but that there is at least 1 line in error, the whole import will be indicated as "in error". However, valid lines will be imported successfully, while incorrect lines will be rejected.
Error message
What to expect in case of error while importing a file?
Messages in the interface
If the columns of your file do not match the attributes of your table, the import will not be accepted and an error message will be displayed.
If the file is not a zipped CSV file, the import will also be rejected and you will be invited to check the format of your file.
Error file
If the import is accepted and executed successfully, you will obtain the following message:
In case of import error, you will be invited to download an error file which will give you more precision on the nature of the error.
With the help of 2 additional columns ("errorCode" and "errorColumn") you will be able to identify the problematic field and the rejection reason for each line in error.
Here are the types of error messages ("errorCode") and their meaning:
- DATA_ALREADY_EXISTS: The import attempt to create a record, but data with same unique key (businessKey) already exists
- DUPLICATE_OBJECT: The import tries to load data, but another record with the same unique attribute already exists
- INVALID_FIELD_VALUE: The value for the attribute in the column "errorColumn" is not valid. It can mean that the given value does not match the expected type or that the given value does not exist in the linked table
- MISSING_FIELD_VALUE: There is no value for the mandatory attribute which is indicated in the column "errorColumn"