Complex configuration
In this chapter we will show different typical use cases which will help you to get accustomed with the CONIGON ADIB. If you are not yet familiar with ADIB we advise you to first check the two predecessing chapters
Import of csv file to database table
This is a basic interface - which we will also use for the next use-case to create a whole portal out of a database table.
Within this use case you will learn
- Create two parameter groups
- Parameter group for csv-import
- Parameter group for MySQL-connection
- Use "dryRun" to get the correct field names (of the file and of the corresponding table)
- Start the process via "direct start" - to see if the data was correctly imported.
First of all let us have a look at the file (called "vbfliesen.csv") which we exported from an ERP system and which contains the following fields / content

IMPORTANT NOTE: The encoding of the file must be "UTF-8". Please take care of this as if you export it from excel it is often rather "ansi-encoded" or "ISO-8859" encoded!
We already created a new table in the destination database with the corresponding fields. In a new version of ADIB you can also choose to create the table dynamically if it does not yet exist.
Create new step
First we create a new step called "Test-Import". We will put it to an existing job called "Job-Tests"
If you do not yet have a job - just create one.
To create the new step
- Go to "ADIB Config" ==> "Steps"
- Click on "New" - and the "step creation wizard" will open up
-
- Step Type
- As "Step type" you do not need to select anything - just click on "Confirm"
- Step Information
- Then type in the texts that you see on the screenshot

- Then click on "Next" - to get to the next screen of the step creation wizard
- Then type in the texts that you see on the screenshot
- Modules
- Here you choose the modules. We will take "Excel" as srcModule.
- Then click on Parameter group => "new" and define "Excel-import" as Name

-
On "Parameters" screen you define the name of "Container"
- In case of a file this is just the name of the file - in our case "vbfliesen.csv"
```
IMPORTANT: If you just define the name without a directory the file is expected to be in the folder "externalData" which is accessible on our server - in the folder where we put the "IntegrationClient"-docker. ``` *
* Finally click on next to create the new parameter group and to assign it to the sourceModule of the new step
* Next we will define the destModule => "MySQL".
* Here you need to create a new parameter group and fill it with the credentials to your database
* If you then click on next the parameter group is created and assigned to the destination module.
* The other module-types (ws-module, preprocess, postprocess) are not relevant the our new step - so you can just click on "next" and get to the next screen
4. Other information
* Here you can define the position (default: the next free position), whether it is active or not and the Modus ("full transfer", "deltaWholeLine" und "deltaDroppedLine"). Furhermore you can define some functions (as connectstepid, mapping values, ...)
* Lets keep it simple and have the following screen:
* Afterwards you need to click several times on "Next" - and also ignore messages / warnings (they are normal as we did not remove the modules that we do not need)
* You will then get to the "step" overview screen. If you already have several steps - just click on the header "positions" two times to sort it in descending order - just like you see on the screen: 
- Step Type
DryRun
Now click on the (+) sign in the functions column for the newly created step.
- On this screen select in the field "dryrun" the entry "conigon" (as this was the instance we created the step for).
- Then switch in the left hand menu to "Jobs" - and select the job "Job-Tests" (as this is the job for which we created the new step)
- Click on the field under the column "Directstart" and choose once again the instance "conigon"

- Afterwards click on the pencil icon
on top of the page to trigger the integrationclient ("IC").- After some seconds (between 10 and 100) you will get informed that the IC finished the job.
- Now switch to "monitoring" on the left hand side menu and open the corresponding job
- You will see that 28 rows have been imported (only fieldnames - as we are in "dryrun" method)

Configuration of step-positions
Dryrun gave us back all columns in the source and destination modules for our step. Now it is time to configure the fields (called "step-positions") that need to be transferred from source to destination.
Click on "steps", search the newly created step and click on the lowest icon on the first column (">"). This will open up the "positions". You will see something like this:

You will not see any rows in this "subtable" as we did not yet add any step-position. There are several ways to do that
- Add the rows one-by-one by clicking on "Create" and then selecting sourceField and destField. This is a good approach if you just want to add very few rows.
- Click on button "InsertAllKnownFields from src/ws/dest". This will open up a wizard which will guide you through the process

-
Initiate
- Here you will define which will be the master of the mapping of the fields
- SourceModule : In our case this is the csv-file we want to import
- DestinationModule : In our case this is the mysql-table in which we want to write the information
- ConnectStep : his option is only visible if the step is the successor of an existing step
We choose DestinationModule (in our case it doesn't matter as the fieldname are equal) * Click on "Insert and map known fields" * You will then see the following screen 2. Browsing
The wizard did the job - as he automatically matched all fields. Nevertheless you can / should do some adaptations here * Remove rows that you do not want to import * Change "Destfield type" if necessaryPlease take care when using numbers and having connections from different module types (i.e. Excel - database, webservices) as the applications do not always act as we expect them to act. Using "varchar" is often the best choice! * If you are happy you can click on "Active" and then on "Next" 3. Overview
- Here you will define which will be the master of the mapping of the fields

The next screen just gives you some information about what will happen next. Just click on "Save" and you are fine. If you then re-open the step-positions of the step you will see a list of 28 rows...
Direct start
Now it is time to start the job - and to import the data. Just go back to "jobs" and select under "Directstart" the instance "conigon" again. In this case - as we do not have a dryRun activated - your integrationclient will import all the data (for all the activated step-positions) from the csv-file to the database. Once again you will get informed as soon as the process was finished. When you go to monitoring you can see the results of the import

In our case ADIB imported 12472 lines within 28 seconds.