How to import CMDB data to multiple tables (win server, Linux server etc..)using transform script

Community Alums
Not applicable

Hi,

I wanted to know how to import different types of CI's to servicenow CMDB tables using Transform maps and scripts.

Consider , I have an excel file which contains multiple Ci type data(windows server, linux server ..) .

i have created a transform map for 'cmdb_ci_win_server' table and it works if i import the windows server data (Ci type = Windows Server) .

If i want to add other CI types (Linux server in the same excel sheet) , how or where we can add a condition like when Type is Windows it should transform the data into ' 'cmdb_ci_win_server' ' and if it is Linux server then ' 'cmdb_ci_linux_server' . 

Thank you

 

 

 

 

8 REPLIES 8

Hello,

Thats super odd. Could you make sure, that the undefined record is not created by something else (delete the record, then run the transform maps without business rules).

Regards

Fabian

Community Alums
Not applicable

Hi,

yes, i tried to run the transform map without business rules and again it is creating undefined record for windows server class 😞

it happens only when i use multiple ci types in s single file.

when i import only windows server file it works as expected.

Any guess the issue with script or something else?

Hey,

i have no clue here. I never ran into that issue before. What confuses me the most is, that it works if the type is just one. Have you checked, that it does not read one of the excel sheet rows as empty and thus creating an undefined record (which would still be confusing as the ci type isn't windows then either).

Last thing to check is just to make sure you have no mapping for the "sys_class_name" field. That can create some issues at times.

I am very sure it is not caused by the onBefore script, but i cannot help you here i guess. Very sorry you encounter that. I would have to dig through the system here. Last thing to try would be replicating it on a personal developer instance.

Regards

Fabian

Community Alums
Not applicable

Hi,

I appreciate your response on time.

i will again look into both transform map and try to identify with difference.

if it is working for Linux class then some issue with windows Transform map .

i will post here if i found the clue.

 

Thank you again for your response and time .