Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
tutorial:adm:systems_-_import_of_data_from_csv [2018/10/04 16:21]
klementm [1. Prepare some virtual system]
tutorial:adm:systems_-_import_of_data_from_csv [2019/04/10 12:53]
klementm
Line 1: Line 1:
 +====== Systems - Import of data from CSV ======
 +
 +<note important>This feature is available in extras module only!</note>
 +
 +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 [[tutorial:adm:how_to_create_virtual_system|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.
 +
 +<code text>
 +"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"
 +</code>
 +
 +
 +===== 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.
 +
 +{{ :tutorial:adm:scrn001.png?600 |}}
 +
 +===== 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.
 +
 +{{ :tutorial:adm:aaaaaa2.png?600 |}}
 +
 +===== 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
 +
 +{{ :tutorial:adm:scrn002.png?600 |}}
 +
 +===== 5. Run the task =====
 +
 +
 +Now we just need to hit run
 +{{ :tutorial:adm:aaaaaaaa6.png?100 |}}
 +
 +and we also need to process it in all tasks
 +{{ :tutorial:adm:aaaaaaaa7.png?600 |}}
 +
 +Everything should be set up so far and when the task ends, your system is ready! Now while generating system, there was created synchronization with name **Link virtual accounts to identities**.
 +
 +{{ :tutorial:adm:scrn003.png?600 |}}
 +
 +Run this synchronization and all entities should be paired.
  
  • by doischert