Hi all, anybody know how to create the CSV file to import users in UCS@school ? Where can i find a template?
please help.
Thanks
Hi all, anybody know how to create the CSV file to import users in UCS@school ? Where can i find a template?
please help.
Thanks
Hey Talpo79,
there is no real template for the CSV import because it was built under the premise to make it adaptable to various CSV input file formats because the data provided by various school management software often differs.
To get the import running some configuration is required, unfortunately the corresponding manual is only available in German currently: UCS@school - Handbuch zur CLI-Import Schnittstelle — UCS@school - Handbuch zur CLI-Import-Schnittstelle
A small example however is provided here: 2.5. Zuordnung von Eingabedaten zu Benutzerattributen — UCS@school - Handbuch zur CLI-Import-Schnittstelle
"Schulen","Vorname","Nachname","Klassen","Mailadresse","Telefonnumer"
"schule1,schule2","Anton","Meyer","schule1-1A,schule2-2B","anton@schule.local",""
"schule1,schule2","Bea","Schmidt","schule1-2B,schule2-1A","bea@schule.local","0421-1234567890"
"schule2","Daniel","Krause","schule2-1A","daniel@schule.local",""
The important thing is to define a mapping that matches at least every required attribute of UCS@school, either by providing a CSV file that matches the default format mentioned in the docs or by configuring the mapping accordingly.
Best regards
Jan-Luca
As an experimental approach, I suggest to do the following:
# Create two schools for experiments:
/usr/share/ucs-school-import/scripts/create_ou test01
/usr/share/ucs-school-import/scripts/create_ou test02
# Execute the test import. It will generate a CSV for 8 users and use a matching configuration:
/usr/share/ucs-school-import/scripts/ucs-school-testuser-import --staff 2 --students 2 --teachers 2 --staffteachers 2 --classes 2 --inclasses 2 --verbose test01 test02
# The generated CSV file:
ls -l test_users*.csv
cat test_users*.csv
# Copy the test-import configuration file to the default custom-config-file location. (It is OK to overwrite the empty config there.):
cp /usr/share/ucs-school-import/configs/ucs-school-testuser-import.json /var/lib/ucs-school-import/configs/user_import.json
# Start an import with the test CSV. It will automatically use your custom configuration. The import will not change the users (they are counted as `Modified`, even when in the DB nothing changed):
/usr/share/ucs-school-import/scripts/ucs-school-user-import -i test_users_???.csv
# Now change the name or a class in the CSV file and run the import again. The users attributes should be modified.
# Look at a users properties using:
udm users/user list --filter uid=USERNAME
Greetings
Daniel