Import CSV - multiple teams for each human

17 views
Skip to first unread message

K Dos

unread,
Nov 4, 2021, 8:52:07 AM11/4/21
to Sahana-Eden
Hi,

I want to import a CSV for human resources.

Each employy belongs to multiple teams. How can I import such a CSV? Is there another delimiter for fields with multiple values?

Thanks

Fran Boon

unread,
Nov 4, 2021, 12:42:52 PM11/4/21
to Sahana Software Foundation
On Thu, 4 Nov 2021 at 12:52, K Dos <kon...@gmail.com> wrote:
> I want to import a CSV for human resources.
> Each employy belongs to multiple teams. How can I import such a CSV? Is there another delimiter for fields with multiple values?

It should be comma-separated, as per:
https://github.com/sahana/eden/blob/master/static/formats/s3csv/hrm/person.xsl#L92

The CSV can use "" around these to distibguish from the commas
separating the fields, so
First Name,Middle Name,Last Name,"Team1,Team2,Team3",etcf

F

Nuwan Waidyanatha

unread,
Nov 10, 2021, 8:11:35 PM11/10/21
to Sahana Software Foundation, Francis Boon, Dominic König
I can't tell you precisely how to solve this but, based on my experience with EDEN,  I can give a few pointers you can explore to resolve this. 

1) You might consider looking into the CSV import mechanism, which to my knowledge, is supported by EDEN's S3CSV and particularly the "hrm" folder: https://github.com/sahana/eden-stable/tree/master/static/formats/s3csv/hrm 
It contains all the import XSL and sample CSV files. Reading through the XSL you can get a sense of what data is required and how they are related and how you should define your CSV files.

2) Furthermore, given that EDEN model is built on an RDBMS you may require importing more than one CSV. From the database, you should be able to make the connections. The tables you may want to investigate are prefixed with "pr" (person) and "hr" (human resources). Within this subset of tables, your tables with names like pr_groups and so on that are integral to formulating the hr_groups you desire. 

3) If you intend to import the CSV files through the GUI then you may have to do multiple uploads. The good thing is it would visually present any errors and conflicts in the data.
There are other methods for example placing the CSV files in a folder and running "clean" or "migrate" type scrip to import the data through a preload or post-load CLI mechanism. Fixing errors can be a bit laborious. Once you figure out step 1 and have defined the CSV files and want to move forward, I can investigate deeper into an efficient way to help you with bulk load without using the GUI. 

If this doesn't help let us know and we'll see how we can simplify this for you.

cheers
Nuwan


--
You received this message because you are subscribed to the Google Groups "Sahana-Eden" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sahana-eden...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sahana-eden/ae901606-a163-49a3-8c48-646ba7311bb3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages