Transform map mapping to child table fields

rahulyamgar
Tera Guru

Hello Friends,

In my transform map, I am mapping the source fields to the cmdb_ci table, but there is a need to map fields to different child tables of cmdb_ci such as network, Windows, Linux server.

I would like to map the fields such as Operating System from source to the OS field of cmdb_ci_computer table. In transform map, table is chosen as cmdb_ci whereas in field mapping i selected the table as cmdb_ci_computer in the map. While transform is run, i am getting an error that OS field is not part of the parent table defined in the target table at transform map level.

 

Thanks,
Rahul

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

you need to create transform map per target table.

you can keep source table of transform map same and then use different target table for transform map.

 

Regards,

Sachin

Tanaji Patil
Tera Guru

I believe you can do that in tranform map script by setting target.sys_class_name.

If you want to tranform records to multiple tables then you can do that by selecting the parent in Table field on the transform map and then in the script set target.sys_class_name based on some conditions.

Could you try setting following line in Script field on your transform map?

target.sys_class_name = "cmdb_ci_computer";

 

-Tanaji

Please mark reply correct/helpful if applicable

Thanks Tanaji. I did the same thing, but field level mapping is generating an error.

Also, If in this case, i have to create multiple transforms for each of my target table, then why is the configuration present to select the target table in the field level mapping. Let`s hear from others.

-Rahul