# Loader

## How to Create an Export/Import Script

| ### What to do:
| The intention of the export script is to define query values for the data export whereby only data of those tables should be exported that are affected by the creation of the new item. For more information about possible query values please refer to the topic Key Elements.
| In order to work through this example you first must have created a user and assigned him/her to a group. In our example the user is "Mike" who is assigned to the group "DEMOEP". Furthermore, you must have created a new item being logged in to your Agile application as user "Mike". The example item is "testitem" which was created at 21. April 2008.
| In case you don't know the data model inside the database with all necessary constraints and other dependencies, it might be helpful to use the SQL-trace to get the list of all tables where data was inserted due to the creation of the new item! For further information on how to use the SQL-Trace, please refer to the DataView documentation in the online help!
| ### Export Script
| Open an editor and write an export script with the following parameters as indicated below:
| test_item.bin . Y MIKE . DEMOEP . . 21.04.2008@00:00:00 . T_CHG_OPR_DAT T_MASTER_DAT BVB_ARTIKEL T_MASTER_HIS BVB_ARTMEH .
| Please note that between the query conditions for the creation date and creation time the whitespace has to be filled with an "@"! The shown date 21.04.2008@00:00:00 is the same like 21.04.2008 without time entry!
| Name the export script test_item.exp and save it in the "dmp" directory of your Agile application.
| With the parameters in the export script you will instruct the loader to export data according to the following definition:
| All changes since the 21.04.2008 at 00:00 local time, in the listed tables, done by user MIKE, who belongs to the group DEMOEP, will be exported to the loader file test_item.bin.
| ### Import Script
| Open an editor and write an import script with the following parameters as indicated below:
| test_item.bin Y I
| Name the import script test_item.imp and save it in the "dmp" directory of your Agile application.
| With the parameters in the import script you will instruct the loader to import data according to the following definition:
| The loader file test_item.bin will be imported in Insert mode ("I") and its query conditions will be used during the import ("Y").

##

##