Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Exchange import error: Relation not defined: PARENT on entity

SOLVED
Go to solution
Highlighted
Anne Besigiroha
Super Collector

Data Exchange import error: Relation not defined: PARENT on entity

Hi all,

Please advise. I am importing configuration item data into Service Desk 4.5 from an excel worksheet. i would like to capture child CI information too (I can import plain data comfortably but still new at the relation business).

I get the following error message Relation not defined: PARENT on entity.......

Please see attached files.

Thanks.

regards,

Anne Besigiroha
19 REPLIES
Gyula Matics_1
Honored Contributor

Re: Data Exchange import error: Relation not defined: PARENT on entity

Does your import map reference the relation? i.e. you need a PARENT reference in your map to connect the children to the parent.

please post your import map.
Anne Besigiroha
Super Collector

Re: Data Exchange import error: Relation not defined: PARENT on entity

Hello Gyula,

thanks for your reponse. Only managed to see it today.

Please see the attached shots of my import mapping.

Thanks once again,

regards,

Anne
Gyula Matics_1
Honored Contributor

Re: Data Exchange import error: Relation not defined: PARENT on entity

You need to add a property called PARENT, reference to field "Parent CIs;CI Parent" for each of your child CI classes (HDD_NAME, MEMORY_NAME, PROCESSOR_NAME)
Anne Besigiroha
Super Collector

Re: Data Exchange import error: Relation not defined: PARENT on entity

Hi Gyula,

Thanks for all the help. Ihave done as suggested and am now getting a different error. please see attached log.

I have cross checked the xml file and nothing has changed there. I even did a fresh export to recreate the xml file but the error still remains. Is there something I am missing?

please advise.

thanks.

Anne
David Borojevic
Frequent Visitor

Re: Data Exchange import error: Relation not defined: PARENT on entity

Hi Anne,

I just looked at the original XML. I have never done relations using this method but I would have thought that the children need to have an attribute (eg PARENT_SEARCHCODE) that uniquely identifies the parent. Then (as Gyula suggests) this is mapped to Parent CI, Parent and is a reference to the SearchCode.

Perhaps attach the xls?

Cheers
Anne Besigiroha
Super Collector

Re: Data Exchange import error: Relation not defined: PARENT on entity

Hi David,

Thanks for your input. Please see attached xls file. Like I said I am not very good with the data exchange process.

regards,

Anne
David Borojevic
Frequent Visitor

Re: Data Exchange import error: Relation not defined: PARENT on entity

Certainly it is definitely possible to create the HDD and Memory as seperate CIs and make them children of the PC but unless you have a good reason to, you might find it better to just make some custom fields and store the Memory size and HDD size as attributes of the PC CI. This would allow things like:

1 An adavnced find/View of all machines with HDD smaller than xyz.
2. PCs with memory less than xyz.

These 2 very common questions are more difficult if they are seperate CIs with Parent Child relations.

However there will no doubt be other stuff that needs to be related so here is the (untested) INI with techniques I would use to do it. You'll note that all PCs are created first, then Memory CIs would be created and the Import mapping for the Parent field would need the "Reference to" set to the SearchCode.

The technique you are trying is from the Manual - I never understood it but I have never needed it, creating all the Parents first is easier I think.

I'm off home now but can help tomorrow if need be.

Cheers
David Borojevic
Frequent Visitor

Re: Data Exchange import error: Relation not defined: PARENT on entity

Certainly it is definitely possible to create the HDD and Memory as seperate CIs and make them children of the PC but unless you have a good reason to, you might find it better to just make some custom fields and store the Memory size and HDD size as attributes of the PC CI. This would allow things like:

1 An adavnced find/View of all machines with HDD smaller than xyz.
2. PCs with memory less than xyz.

These 2 very common questions are more difficult if they are seperate CIs with Parent Child relations.

However there will no doubt be other stuff that needs to be related so here is the (untested) INI with techniques I would use to do it. You'll note that all PCs are created first, then Memory CIs would be created and the Import mapping for the Parent field would need the "Reference to" set to the SearchCode.

The technique you are trying is from the Manual - I never understood it but I have never needed it, creating all the Parents first is easier I think.

I.m off home now but can help again tomorrow if you need it.

Cheers
David Borojevic
Frequent Visitor

Re: Data Exchange import error: Relation not defined: PARENT on entity

sorry for the double reply - I got a system unavailabe message but it must have still psoted the forst time.
David Borojevic
Frequent Visitor

Re: Data Exchange import error: Relation not defined: PARENT on entity

sorry for the double reply - I got a system unavailabe message but it must have still posted the first time.
Anne Besigiroha
Super Collector

Re: Data Exchange import error: Relation not defined: PARENT on entity

Hi David,

you are right, I was using the approach in the manual which I was finding hard to understand too!

I will try the ini you have attached and will keep you posted.

After today, i will be in touch probably friday as tomorrow is presidential election day here.

thanks for all the help.

regards,

Anne
Anne Besigiroha
Super Collector

Re: Data Exchange import error: Relation not defined: PARENT on entity

Hi David,

We are back from the electioons.

I have tried the file you sent and only get a small error about maximum installations. Please see the attached error log.


Thanks,

Anne
David Borojevic
Frequent Visitor

Re: Data Exchange import error: Relation not defined: PARENT on entity

So you are still keen to have Memory and HDD as separate CI's???

Can you paste the XML and a screen shot of the Import Mapping?

Cheers
Anne Besigiroha
Super Collector

Re: Data Exchange import error: Relation not defined: PARENT on entity

Hi David,

Thanks for response. I am using the memory and HDD to test the process and when it is working I will then be able to substitute with the actual information we need. I first need to understand the process.

Please see the attached files. I had to modify the file you sent a bit as I kept getting the relation not defined error. Now it is the max. installations error I am getting.

Regards,

Anne
David Borojevic
Frequent Visitor

Re: Data Exchange import error: Relation not defined: PARENT on entity

Can you attach the modified ini. Your XML is still doing a PC then a Mem then a PC then a Mem. It should do all PCs then all Mem.

Typically the max installations/unique is set by the template - it is a required field.

I was slightly wrong in a previous post. CI to CI parent child relations are different to other Parent child relations in OVSD. With CI to CIs it is a Many to Many Parent/Child relationship (normally 1 to Many) but the Max Installations will limit the number of Parents a non unique CI can have. If you have unique CIs then it can only have a single parent (I think?). You should have unique CIs if the CI represents a single physical CI. I think that non-unique would be used for software licenses (ie 10 Licenses = Max Install = 10 then only 10 Parents allowed).

I think that for Mem you would have unique CI set and the PC is the Parent (Sole Parent).

So back to the Data Exchange. YOu will need 3 Classes in the INI and 3 Item Mappings in your Import Mapping

1) Import PCs CIs
2) Import Mem CIs
3) Import Parent Child Relations into "CI-Components" Table - you will need the MEM Searchcode and PC Searchcode.

If this doesn't make sense post your ini.

Cheers
Anne Besigiroha
Super Collector

Re: Data Exchange import error: Relation not defined: PARENT on entity

David,


Please see attached .ini file.

thanks
David Borojevic
Frequent Visitor
Solution

Re: Data Exchange import error: Relation not defined: PARENT on entity

Hi Anne,

See attached word doc. It has ini and mappings that I would use.

Cheers
Anne Besigiroha
Super Collector

Re: Data Exchange import error: Relation not defined: PARENT on entity

David,

Thank you so much. The ini and mapping you sent me work perfectly.


Thank you for all the pointers you have given me in the past days and for being patient.

Regards,

Anne
David Borojevic
Frequent Visitor

Re: Data Exchange import error: Relation not defined: PARENT on entity

Excellent stuff. Well done.

I initially had difficulty doing relations in data exchange, and the forums helped me - so I am happy to help someone else starting out. You started with a more tricky one - being a Many to Many relationship but now you should have no trouble with the easier ones.

Cheers
//Add this to "OnDomLoad" event