Systems - Import of data from CSV
Have you ever wonder that Virtual System would be good for you but cannot find the way how to import data at first? Well, now we are able to do so by LongRunningTask which takes schema id and other arguments and imports all into the system. In this tutorial, I will show you step by step how to run it!
1a. Prepare some virtual system
Please use this tutorial to do so!
1b. Prepare some CSV file
Here is an example of CSV file which can be used for import to the system.
"username";"email";"firstName";"lastName";"phone";"titleAfter";"titleBefore";"__ENABLE__" "arnold";"arnold@somename.com";"Arnold";"Stastny";"723067901";"";"";"false" "betty";"betty@somename.com";"Betty";"Lenc";"724647897";"";"";"false" "cecilia";"cecilia@somename.com";"Cecilia";"Rudnik";"887824836";"";"";"false" "elizabeth";"elizabeth@somename.com";"Elizabeth";"Martinson";"123456789";"";"";"false" "peter";"peter@somename.com";"Peter";"Bondra";"";"ing.";"";"true" "ruth";"ruth@somename.com";"Ruth";"Delict";"";"";"dis.";"false" "joe";"joe@somename.com";"Joe";"LaBonte";"";"bc.";"";"false"
2. Copy schema name
Now the new system should be created by your chosen name. Please copy or remember this name and follow to the next steps.
3. Create new LongRunningTask
Now we will create the new LongRunningTask(LRT). As shown in the picture, go to Settings → Task scheduler → Scheduled tasks and hit green "Add" button to add new LRT.
4. Fill all attributes
Now we need to create new LRT with these attributes:
- Task type - Have to be ImportFromCSVToSystemExecutor
- Description - it is up to you how you want it - just describes the task
- Instance - Have to be idm-primary
- Name of system - now we paste our name of system
- Path to file - CSV file from which it will be imported
- Name attribute - the attribute which holds the name - usually same as uid
- Uid attribute - which the attribute is UID in your system
- Attribute separator - which character separates the attributes
- Separator of multivalued attributes - the character which separates values - multivalued