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

Hierarchy sync using Sync editor or data importer - 7.1.1

Hi Experts,

Is it possible to create a hierarchy structure when synchronising data from a CSV? We need to create AccProductGroups in a hierarchy, and it can go many levels deep. 

I tried using sync editor but it only creates the first root node (hierarchy sync flag is set on the mapping)

Our CSV schema is something like this

 

Ident_AccProduct Parent FullPath
Parent  
Child1 Parent
Child2 Parent
Grandchild Parent\Child1
GrandGrandChild Parent\Child1\GrandChild

We need to create

  • Parent
    • Child1
      • Grandchild
        • GrandGrandChilld
    • Child2

 

 

Thanks

Kin

  • Hi,

    In short, yes but like Data Importer you effectively have to run two imports to get the parent/child relationships.

    One way to do it all in one go is, create a mapping that for AccProductGroups that does everything except populate the parent AccProductGroup value, then create a second mapping with "suitable for updates only" option checked, and have it update the AccProductGroup attribute.

    Configure a workflow to import all product groups as the first step, the second step is update the attribute for the parent UID.
  • I have to correct the answer from Tim here.

    It is, of course, possible to import hierarchies using the CSV connector without having to execute the import several times.

    The synchronization engine of One Identity Manager supports a feature called automatic dependency resolution that auto-generates import step in your synchronization workflow to re-execute hierarchy mappings if they couldn't be satisfied during the first synchronization run (obviously the case when you import a hierarchy from a CSV file and the CSV file is not sorted).

    There is also a video on YouTube that demonstrates the use of this feature. https://www.youtube.com/watch?v=k2JJbfOLZSU&index=10&list=PL242czeZwlAlLnykigzKSjywrA8ZkaxLA

    To use this your synchronization workflow needs to have the dependency resolution set to Automatic and the maintenance mode on the startup configuration for the synchronization workflow must not be set to No maintenance. In case of your multi-level hierarchy, it might be necessary to set the maintenance mode to Full maintenance and adjust the number of retries accordingly.

  • That's the "proper" way to do it, Markus- but in order to say that'll work, I'd need to see the content, format, consistency and quality of the CSV data to be imported.

    if there are any cases where Parent node doesn't exist, or its child nodes have NULL as the pointer to the parent container, or if there's a break in the heirarchy (e.g. application owners will only expose objects in their CSV from Top\Child1\GrandChild1 nodes down) my experience is, this can trip up the import logic you describe.

    At which point, the two step import gives you more flexibility on handling any issues with the heirarchy.
  • It should also be possbile to import simple hierarchy structures by having the entries in your import csv in the right order, i.e. sorted by level top-down (Parent, Child1,Child2, Grandchild, Grandchildchild), and then use foreign key resolution for the parent column

    I've been successfully importing configuration parameter structures like that, without using the dependency resolution features or mutiple passes.

    EDIT: I was actually referring to DataImport here, not sync editor. Maybe it applies for the csv connector as well?

  • Good point.

    You can define one column as hierarchical sort criteria in the schema definition of the CSV connector as well. Please keep in mind that only one column can be marked as such.

  • Thanks Christian, yes having the hierarchy in order works as standard. I didn't know about the option Markus suggested!