# Loader

## How to Import table data with the external XML loader

| ### What to do:
| In order to work through this example you must have completed the example Exporting table data with the new loader and must have created an import script as described in the example Creating an export/import script.
| Please note that prior to any user data import, the repository data (entity, table, field ...) must exist. Also it must be checked if the tables and fields have been created on the database. This is an assential prerequesite for any data import as otherwise the loader won't be able to identify the type of data to be imported!
| Please note that the script to start the loader (loader.bat/loader.sh) is located in the following directories:
| Windows: <ep_root>/axalant/cmd/loader.bat Unix: <ep_root>/axalant/scripts/loader.sh
| Call the program with the command loader.
| Enter the following parameters according to the syntax required:
| loader <app_name> --import <import script name>.imp
| In case an error comes up, a possible reason might be that the file was not found. Read the error message carefully as it contains the search path!
| If you have successfully completed the table data import the results will be displayed on the command line of the loader.
| More precise information about the imported table data can be seen in the loader file.
| As an example, the message output may look as follows:
| It is a new binary loader file! Encoding is UTF-8 No need to read or convert the file. Direct import into database! Importing into database db:yin/*****@melon Binary loader is called to load data into database db:yin/*****@melon. Please wait... System encoding for wide char is: UTF-8, and for standard char: ibm-5348_P100-1997 Load file D:/Agile_e6.1/app_name/dmp/test.bin Importing records into table: T_MESSAGE: O Importing 1 records into table: T_MESSAGE: U Importing 5 records into table: T_MESSAGE: I Done.
| Presently there's no possibility to write XML loader files directly into the database. Therefore, XML loader files are converted to binary loader files before they are imported into the database! It is also possible to convert XML loader files explicitly before loading them!