Relationship mapping from a csv data source

Tagged: ,

This topic contains 10 replies, has 5 voices, and was last updated by  pinkupradeep 4 months, 1 week ago.

  • Author
  • #16152

    Hi all,
    I am new to OpenIDM and i am working on a task to make employee-manager relationship. The thing here is that data source is a csv file and the manager column contains the username of the manager as follows:

    id username first_name last_name email jobtitle manager
    1 tgardner0 Thomas Gardne Software Engineer sadams1

    working in UI, it can be easily done, but what should I do in the object type of connector or the mapping if the details of multiple employee comes in a single csv.

    Please help!!

     Jake Feasel 

    Please clarify the exact nature of the problem or question you have.


    Hi Jake,
    I’m working on a task in which i get employee data in a csv. Firstly, in UI we have an option to directly add manager in user details(just click add manager). But how can I provide the reference to the manager if the user detail is coming from a csv and i want the manager to be reflected in the user detail once i reconcile.

    id username first_name last_name email jobtitle manager
    1 tgardner0 Thomas Gardner Software Engineer sadams1
    2 jcole1 Jay Cole Test Engineer sadams1

    I this i have 2 identities which i want to reconcile and both contain the username of their manager. sadams1 is already present in openIDM. Now i want to know what changes should i make in the connector object type or the mapping so that after i reconcile, manager is reflected in the user details just like it is reflected when we add manager in the UI.

     Jake Feasel 

    Take a look at the workflow sample. It does pretty much this exact thing – there is a csv file (or possibly an XML file depending on which version you are looking at) which has one record per user, and a reference to the userName of the manager for those users. You can see in the sync.json how that is mapped.


    Still haven’t found the workflow sample. But i found a link close to my requirement

    the difference is it maps user-role relationship by adding a transformation script. I want a employ this type of tactic(using transformation script) to add manager to user.
    I hope u could help me to with the script part.

    PS: the blog has your name so i hope u could help:)

     Jake Feasel 

    Do you have the folder “samples/workflow” in your installation? That’s the workflow sample.


    Thanks Jake, I found the transformation script required for the manager mapping.


    @pervinderpalsingh @pervindersingh – I have same problem like you . Could you share the transformation script used to manager and employee assignment .



    Here’s the script:

    {‘_ref’: ‘managed/user/’ + openidm.query(‘managed/user’, {‘_queryFilter’: ‘/userName eq \”‘+source+’\”‘}).result[0]._id}

    openidm.query() method will get the _id attribute of the manager by comparing his userName(source) with the existing users.

    _ref parameter is the one that establishes the relation.
    Eg: ‘_ref’ = ‘managed/user/<randomID>’


    @pervinderpalsingh Thanks Pervinder, It works now . One more query on a use case-

    I am not able to provision manager attribute in target . I am using in my transformation script.

    In logs couldn’t detect any useful info . However during reconciliation all other attribute are flowing well other than Manager attribute , not sure why .

    I tried sync-with-provisioning workflow sample but couldn’t get any thing relevant to that use case.

    Appreciate if you could help.

    Thank you



    When I use this I am getting the below message. Could you please help.

    – manager: Must be one of the following types: object. Cannot be string

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

©2019 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?