Undo Import?

gerardjohnson
Kilo Contributor

Hello, I imported an xls using System Import Sets and it didn't work, producing incorrect entries.

Can i undo this, and so delete the entries the import created?

I'd like to try again fresh.

1 ACCEPTED SOLUTION

Hi Gerard,



Can you identify the unwanted rows via a list view and appropriate query?


http://wiki.servicenow.com/index.php?title=Encoded_Query_Strings#gsc.tab=0


If so the next step could be to create a script that used the encoded query to generate a list, or may be a count, of affected rows.


Assuming that the number of affected rows is too high to allow fixing the issue from the GUI.



I do not suggest actually deleting rows until you have completed a through analysis of the what the current situation, and what options you have to put it right. Plus carried out some validation, which might for example, include deleting a single record with a script to check results.



Probably other Community members have additional useful inputs too.



Best Regards



Tony


View solution in original post

7 REPLIES 7

Deepak Ingale1
Mega Sage

Hello Gerald.


If you have imported cofiguration related detsils which gets csptured in updafe set then backing out the update set ll remove customization.


Hello thank you.


The import is not in the System Update Sets/ Local Update Sets, so there's nothing to back out from.


tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Gerard,



http://wiki.servicenow.com/index.php?title=Import_Sets#System_Import_Sets&gsc.tab=0



Have you run just the import to an import set, without the transform?


In which case you need take no action.



If you have ran the transform as well, the import may have updated, created or even deleted records in one or more tables.


Evidently there could be business rules on the target tables which could carry out further action which need to be undone.



If any of the affected table had auditing turned on when the transform was carried out this might help.


Turning on Auditing (History) for a Table - ServiceNow Wiki



Best Regards



Tony


Hello and thank you. There is no auditing turned on for our tables.


My process was;


Exported cmbd_ci_computer


Matched columns in xls to be imported.


System Import Sets, Load Data, Create table, Label is the request number, File with source file selected.


Create Transform map, set name, date, Target Table Computer [cmbd_ci_computer] , Run business rules ticked, Enforce mandatory fields set to No.


Auto Map Matching Fields, set Coalesce to true, Transform



There is a field in our Base Item, Computers that is not in cmbd_ci_computer, named Model ID.


It is from alm_hardware which feeds an Asset Management app.


Problem is the UID or Name for the CI is created from the Model ID + Asset tag fields.



So I want to undo my import, deleting the dud CI entries and Assets entries made by business rule for Assets Management app, then try again with the missing Model ID and Name fields.