Difference between revisions of "Data import"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 44: Line 44:


[[Image:Imports_menu.png|alt import_menu]]
[[Image:Imports_menu.png|alt import_menu]]
=== Temporary User ID & Temporary Device ID ===
These fields are necessary to map DIDs to Devices and Devices to Users.
Example:
You have some other system with some user_ids, device_ids, did_ids. You export them into CSV files. Relation between them are kept by these IDs, so importing them to MOR will keep these relations.
First you need to import User with some temporary ID then make sure this ID is near each Device you are trying to import. And select this ID as Temporary User ID when importing Devices. That way these devices will be mapped to this User.


== Importing users ==
== Importing users ==
Line 49: Line 60:
[[Image:Imports_users_selection.png|alt Imports_users_selection]]  
[[Image:Imports_users_selection.png|alt Imports_users_selection]]  


Now please locate the csv file in your local system by clicking the "Browse" button.
Now please locate the csv file in your local system by clicking the "Browse" button. As stated before don't press on "Include first line?" checkbox if you have used the first line for commenting the fields.


[[Image:Upload_csv_file.png|alt upload_csv_file]]
[[Image:Upload_csv_file.png|alt upload_csv_file]]
Line 56: Line 67:
'''Click on "Upload file" button.'''
'''Click on "Upload file" button.'''


In next menu please fill the requested data (you should select the correct field from your csv file). '''You must select a field for each selection box marked with an asterisk (*) symbol'''.


=== Temporary User ID & Temporary Device ID ===
These fields are necessary to map DIDs to Devices and Devices to Users.
Example:
You have some other system with some user_ids, device_ids, did_ids. You export them into CSV files. Relation between them are kept by these IDs, so importing them to MOR will keep these relations.


 
[[Image:Select_fields.png|alt select_fields]]
First you need to import User with some temporary ID then make sure this ID is near each Device you are trying to import. And select this ID as Temporary User ID when importing Devices. That way these devices will be mapped to this User.

Revision as of 07:03, 5 June 2009

User/Device/DID import

You must import the data in the following order from CSV files:

1. Users data
2. Devices data
3. DIDs data


CSV file format

You can upload your data from a CSV file, which has the following structure:
1. Each record is started in a new line.
2. Each piece of record information is separated with commas (see the example).
3. Text is enclosed with inverted commas (example: "name")
4. Numbers are written without inverted commas (example: 4)
5. First line can be used for your own needs, like for naming each field of information. If you do so - do not select "include first line?" option when asked.

For example:
We have a csv file named example.csv with contents in it:

"id","username","password","e-mail"
1,"username1","verySecretPassword","example@example.com"
2,"username2","34r34r4232","example2@example.com"
3,"username3","23er29923wjwe","example3@example.com"

Explaination:
The first line I used here was for naming the fields, so when asked do not select "include first line?" option (if you won't use the first line for naming the fields, when please select "include first line?")
Other 3 lines (starting 1,2,3) are for data records. Each record (the first one is: 1,"username1","verySecretPassword","example@example.com") represents:
1 - user id
"username1" - user's username
"verySecretPassword" - user's password
"example@example.com" - user's e-mail

Your CSV file can have any number of lines with any number of fields (each line must have the same number of fields).

P.S. The file should not have any other symbols, except those stated before. Be careful, as some editors can add their own formatting symbols. In windows we recommend to use notepad, in linux: gedit, kedit, nano.

Importing data

Firstly from MOR Grafical User Interface (later: GUI) navigate to: Settings -> Users -> Import, as in the picture:

alt import_menu

Temporary User ID & Temporary Device ID

These fields are necessary to map DIDs to Devices and Devices to Users.

Example:

You have some other system with some user_ids, device_ids, did_ids. You export them into CSV files. Relation between them are kept by these IDs, so importing them to MOR will keep these relations.


First you need to import User with some temporary ID then make sure this ID is near each Device you are trying to import. And select this ID as Temporary User ID when importing Devices. That way these devices will be mapped to this User.

Importing users

To import users click on "Import Users from CSV" link:
alt Imports_users_selection

Now please locate the csv file in your local system by clicking the "Browse" button. As stated before don't press on "Include first line?" checkbox if you have used the first line for commenting the fields.

alt upload_csv_file


Click on "Upload file" button.

In next menu please fill the requested data (you should select the correct field from your csv file). You must select a field for each selection box marked with an asterisk (*) symbol.


alt select_fields