User Files Page

User Files Page

The User Files page provides access to user file management functionality. You can use this page to upload data or schema files to the server or to import data onto the repository. The most efficient method for loading a large number of records onto your instance is by importing the data from a file.

Before you can import data on the instance you must first upload your data file to the server. To upload a file to the server simply drag the file to the upload area in the bottom of the page, or click the “here” link to browse through your local directory for the file that you would like to upload.

Once the file has been uploaded, you can import it onto your server by first checking the box next to the file you want to upload. This will bring up the button bar at the bottom of the screen with the “Import” and “Delete” user file entry options. If the file that you have upload is an entity schema file that you exported through the Entity page, make sure you mark the user file entry to be of entity type. You do that by checking the checkbox in the “Entity?” column of the user file entry.

Pressing the “Import” button will bring up the “Import User File” dialog where you specify the options that control the file import process. The options are described in detail in the page for the Flexible File loader.

The “Delete” button allows you to delete a file entry from the list.

Uploading Mapping Files

Starting with version 4.4.0 of OpenEMPI, you can now also upload mapping files using the User Files functionality. The process for uploading a mapping file is the same as that of uploading any other file. The only difference is that you need to mark mapping files as such after they have been uploaded so that they can be used by the file loader to map fields from a data file into the fields of an entity. In versions of OpenEMPI after 4.4.0 there is now a column called “Mapping?”. After you upload a mapping file, you need to check the checkbox under the “Mapping?” column to indicate that this file contains the definition of a mapping.

image-20251026-132534.png

Generating Mapping Files

Starting with version 4.4.0 of OpenEMPI, you can generate a mapping file for use with the Flexible File Loader using the UI instead of having to do it manually using an editor. To begin the generation of a mapping file, you must first select the data file for which you want to generate a mapping file and select the “Generate Mapping” option from the pop-up menu. In the following figure we begin the process of generating a mapping file for the ‘test-data-6k.csv’ file by first selecting the checkbox corresponding to this file and then selecting the “Generate Mapping” option from the menu that pops-up below.

image-20251026-141628.png

Once you choose the “Generate Mapping” option, a dialog will come up that will display the first one hundred rows from the data file, separated into columns based on the default delimiter. You can specify the name of the mapping file and the delimiter for your data file using the text edit box and drop-down selection, respectively, at the top of the dialog. If the first row of the data file contains a header, you can check the “First row is a header” checkbox and the first row will be skipped. This option is enabled by default. In the figure below, the filename for the mapping file has been set to “Demo-Mapping-File”, the delimiter is set to the default “Comma (,)” option, and the first row has been marked as being a header.

image-20251026-144744.png

The next step in the process of specifying the mapping file is to specify for each column of the data file the entity field to which the column should be mapped to and any additional details about the mapping. For example, the first column of this data file is an identifier and should be loaded as an identifier associated with the record whereas the second column should be mapped to the “Given Name” entity field and the quotes that the value is enclosed in should be removed. To specify the mapping for each column, select the column whose mapping you want to define by checking the corresponding checkbox. This will bring up another dialog box that allows you to define the mapping for the selected column.

The figure below shows the mapping definition dialog for the first column. Since this column should be imported as an identifier that is associated with the record, we selected the special value ‘<identifier>’ from the ‘Entity Field Name’ drop-down. We then specify the data type as “String” and select the Identifier Domain with which the Identifier should be associated. When you are done specifying the mapping option for the selected field, press the “Save” button to return back to the main dialog.

image-20251026-145620.png

In this data file, the second column should be mapped into the “givenName” field of the entity. The figure below shows the mapping definition for this field. We have selected the “givenName” entity field and have specified the data type for the mapped field as a String. Since we also want to remove the double-quotes that are enclosing the values of this column, we checked the checkbox “Values in this column are quoted” and specified the quote character as the double quote character.

image-20251026-150525.png

After you have specified the mapping for all the columns of the data file, you can press the “Generate” button at the bottom of the main dialog that should now be activated, to save the mapping file definition in the mapping file. Once the mapping file has been generated, the dialog will close and there will be a new entry in the User Files table corresponding to the mapping file that was generated.