This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Importing data from a csv file containing duplicates

Hello,

I'm importing users from a csv file into the UNSAccountB table. The file format is:

user,group,...

jdoe, groupA,..

jdoe,groupB,..

marry, groupA

....

I'm using a SynchronizationEditor project to perform this import but it is failing since jdoe came two in the file, complaining about dupes. Can anyone guide me how to handle these dupes in the sync project?

Thanks.

  • HI Syeda,

    I don't have time to do a full write up right now, but very quickly, create a virtual property as a join property that combines the fields together with a separator, like jdoe|groupA,jDoe,groupB.  Make the virtual property the key.  Then use the M:N property mapper to map the group membership.

    I'll do a full writeup when I get some time.

    G

  • Thanks George. 

    Can you be more specific about using M:N property mapper

    I have following mapping defined (to the UNSAccountB table)

    Object mapping 

    AccountName <-- User

    Property mapping:

    AccountName <-- User

  • Just to add that I intend to define three mapping:

    - First to the UNSAccountB table, only loading users

    - Second to the UNSGroupB table, only loading groups from the same csv file

    - And lastly loading users and groups to the UNSAccountBInUNSGroupB table

    As I explained, first mapping is failing 'cause it has multiple records for the same user (but with diff groups)

  • Coming with version 8, you will have the option to create filtered schema classes that would allow you to filter your objects by the distinct value of a property.

    In your case, you would need to create two new schema classes based on your import file, one for the users, one for the accounts, and create two new mappings based on that schema classes.