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 References in One Identity

I've got a SQL HR database with two tables. One table has general HR data, the other has departments. The HR table contains a field department that contains the number of the department in the departments table. Basic foreign key reference. I can import the users into One Identity and I can import the departments but I'm not sure how or where I can flow the reference so that uid_department on the user is set to the correct department as indicated by the HR table. One way I could go it is to flow the number into One Identity on the person object then create a template and I think I can cajole it into selecting the right department and updating the uid_department field. Is there a better way to do this where I can import and it will automatically populate the department properly? If you can point me at any documentation that would good to. 

 

Thanks

  • Hi,

    you could check some of the videos on the One Identity channel to get some more information https://www.youtube.com/playlist?list=PL242czeZwlAlLnykigzKSjywrA8ZkaxLA.

    For your case, I suggest to take a look at videos number #9 and #10 from the 7 Bits series.

    https://www.youtube.com/watch?v=hyt1gkkwlrc&index=9&list=PL242czeZwlAlLnykigzKSjywrA8ZkaxLA

    https://www.youtube.com/watch?v=k2JJbfOLZSU&index=10&list=PL242czeZwlAlLnykigzKSjywrA8ZkaxLA

    What you need is a virtual property on the left (the OneIM side) of your mapping from type "Key resolution by reference".

    If you specify the relations in your SQL HR database connection, the system should ask you about replacing the normal mapping rule with reference mapping during a drag-n-drop operation to create a mapping rule (like the following).

    Take a look at the following screenshot demonstrating a similar case where the country code coun_code from my MySQL database has to be mapped to Person.UID_DialogCountry in my OneIM database.

    Hth

  • Hi,

    Are you using Version 7.1 or later?

    I have set up something similar to this in a test lab with a dummy HRMS database. In mine, the department ID is an autonumber. So, a description of a department might change, but the number assigned to it is permanent. For this reason, the department table sync didn't need to do object matching on any attribute other than the autonumber.

    So I created a virtual property for a custom property as follows on the "HRDepartment to OneIM Department" mapping:

    Virtual Property Name: VRT_CustomProperty03AsDecimal
    Display Name: DeptID in CustomProperty03
    Base Property: CustomProperty03
    New Data Type: Decimal - fix point number

    The object matching rule was added as follows:

    Rule Name: VRT_CustomProperty03AsDecimal_DeptID
    Display Name: Spare field no. 03 <-> DeptID
    Case Sensitive: checked

    One Identity Manager Schema Property: VRT_CustomProperty03AsDecimal
    Target System Schema property: DeptID

    Step 2: on the Person sync, create a "key conversion by reference" custom property:

    Virtual Property Name: UID_Department_from_CustomProperty03
    Base Property: CustomProperty03

    Once you've got this, then you can resolve UID_Department from DeptID.

    One way to do that is translate the DeptID to a virtual property in your Person import, and use that to look up the UID_Department during the sync.

    Another way to do it is by setting a custom property with DeptID from the employee table, and then use a template on the custom property to look up UID_Department.

    I cannot advise which of the two approaches is best to take; the answer to that question depends on factors like, how often does your department structure change and how often do people move from one department to another; how many departments and people do you have....
  • Hi Markus,

    For me (using 7.1.1), the "key resolution by reference" approach for a custom property only works on a Person sync project when I choose UID_DialogCountry, UID_RealPerson, UID_PersonHead or UID_PersonMasterIdentity or UID_X500Person as the base property.

    If I select UID_Department, UID_ProfitCenter, UID_Locality, UID_DialogState, UID_WorkDesk, UID_Org,  or any other UID, I get an error like this one:

    2017-07-06 10:11:00    SqlLog    (< 1 ms) - select max(IsDBSchedulerDisabled), max(IsJobServiceDisabled), max(DbQueueWaitForCompiler) from (
                        select    IsDBSchedulerDisabled, IsJobServiceDisabled, 0 as DbQueueWaitForCompiler
                        from    DialogDatabase with (nolock)
                        where    IsMainDatabase = 1

                        union all

                        select    0 as IsDBSchedulerDisabled, 0 as IsJobServiceDisabled, 1 as DbQueueWaitForCompiler
                        from    DialogTable with (nolock)
                        where    exists (select 1 from QBM_VDBQueueContent where UID_Task = 'QBM-K-COMMONWAITFORCOMPILER')) as x
    2017-07-06 10:11:13    VI.FormBase.ExceptionMgr    The reference ( (Person_UID_Locality_Locations)) has no target!
    2017-07-06 10:11:30    SqlLog    (4 ms) - select max(IsDBSchedulerDisabled), max(IsJobServiceDisabled), max(DbQueueWaitForCompiler) from (
                        select    IsDBSchedulerDisabled, IsJobServiceDisabled, 0 as DbQueueWaitForCompiler
                        from    DialogDatabase with (nolock)
                        where    IsMainDatabase = 1

                        union all

                        select    0 as IsDBSchedulerDisabled, 0 as IsJobServiceDisabled, 1 as DbQueueWaitForCompiler
                        from    DialogTable with (nolock)
                        where    exists (select 1 from QBM_VDBQueueContent where UID_Task = 'QBM-K-COMMONWAITFORCOMPILER')) as x
    2017-07-06 10:11:58    VI.FormBase.ExceptionMgr    The reference ( (Person_UID_Locality_Locations)) has no target!

     

    The most consistent way I can get  to a custom property to find the right UID_Department value to go with the DeptID retrieved from the target system, is to use a script property.

  • You are missing the schema classes these UIDs are pointing to in your sync project.

    Perhaps, they have been removed from the project during the last project activation, because you haven't used them.

    Just reload the schema for the OneIM connector and things start to work as expected.

    To prevent a schema class from being removed, you can pin it during the activation / shrink operation.

  • Thanks. I have checked and that's exactly what happened - I'd trimmed down some of the mappings and workflows in the project while testing something else, and the unused schema classes dropped off the list.