Import files with an import definition

Import definitions are required to map raw data from an XML, XLS, CSV or other files to Novulo records and fields.

Creating a new import definition

  1. Go to all apps > application maintenance > Import > Import definitions
  2. Create a new import definition:
    Empty import definition
  • Dataset: Choose the type of records you are importing
  • Key value: Choose the column to be used as the key value. Each record to be imported must have a unique value entered for this field. In most cases, it is a good idea to choose GUID or ID here.
  • Duplicate behaviour: Choose what the application should do in case the application wants to import a record where the key value(s) match. This can occur if one runs the same import accidentally or deliberately several times
  • Don’t add new records: Avoid adding new records and only overwrite existing ones
  • Use parameters: Custom parameters can be used to map the fields to be read in differently depending on values to be specified. This is not mandatory and for somewhat more advanced applications.
  • Import type: Choose the format of the source file.
    → XLS > Sheet name: When you import an Excel file, the application needs to know which sheet contains the data to be imported. This field is case-sensitive.
    → XML > Record X path: The XPath to get to the records to be imported. To import products from an XML with the following structure “<root>…<products><product>…</product> … </products>…</root>” one could simply enter ‘root/products’ to import all <product> -tags as separate records.
  1. Save the definition.

  2. Add “fields” to the import definition. Each field represents a value that should be imported for the parent dataset.
    Untitled

  • (1) Target field: This is the field within Novulo that we would like to populate with the new data.
  • (2) Type: The data type of the field to be filled.
  • (3) Source fields: A list of fields/columns from the source file. In the example, we are looking for a property of the source record called ‘name’ and of type string. Furthermore, the source field has a number. In this case, 1. One can read multiple source fields and transform them into 1 field in Novulo.
  • (4) Target expression: An expression that can transform the ‘raw’ data from the source fields before it is imported. In the example, no transformation takes place and the data from source field with number 1 (field_1) is used.
  • (5) By enabling advanced expressions, one can use an advanced Novulo expression to transform the source data before importing. For example, if one wants to hang ‘_Test_Suffix’ after each name, one can do so with this simple expression:
    Example advanced expression
    It is also important that the raw source data either matches in terms of data type or that the source data is transformed to the correct type. For example, if the source data (3) was an INT, but the target type is a string one would need to transform the data. With the advanced expression “field_1.tostring()” one could transform the source data “field_1” from an INT to a string.
  1. Check that you have at least 1 key value in the list of fields. If you don’t have one, add it via the list of key values via the more menu. The key value is important to uniquely identify records and to prevent duplicate imports.

  2. Go to the start screen > all apps > application maintenance > import and add a new one.

  3. Choose “with a definition” as the method and then choose your own definition, upload the import file and perform the import.

  4. View the import logs to check whether the import was successful.

1 Like