How to update records from Excel sheet

Sunny45
Kilo Guru

Hello Team,

I have some 12K records which needs to be updated on cmdb_ci_computer table. They belong to various classes (e.g. Servers, Desktops, Laptops). I have host name, and status (Status Needs to be updated) in Excel. What is my best option to update these records? 

Can this be done using script?

Please advise with all steps.

Thanks. 

1 ACCEPTED SOLUTION

I Will suggest you to execute this on 10-15 Records first, to see that you are getting your perfect output or not. DO NOT PERFORM THIS ON 12K RECORDS DIRECTLY.

1) Navigate to System Import Sets > Load Date. Create Staging Table and Upload Excel sheet > Submit

2) Navigate to "Create Transform Map" 

find_real_file.png

3) Select Target table is Computer[cmdb_ci_computer] and save. So you will get option for Field Mapping.

4) Make sure you are mapping fields correctly, Use Field Maps

5) Run Script should be checked

6) Configure the script according to your requirement. Refer the script which I've provided.

find_real_file.png

7) Click on Transform

 

Please tell us if you face any issues.

Thanks

View solution in original post

8 REPLIES 8

Excellent solution Prasad. That really worked well.

Thanks a ton. 🙂

 

Sunny.

Glad to help 🙂 

Sweety5
Tera Contributor

Hi , 

Can you please attach screenshot of your excel sheet . 

Thanks

Hi Sweety,

Here it is. 

find_real_file.png