Delete Import set tables

prashanth_udupa
Kilo Explorer

Looks like once the import set table is created, we cannot delete it (If we issue delete command, it takes very long and does not delete the table. The same thing happened to couple of tables). Even if we delete the corresponding Data source, the import set table still remains. Is there any way to remove these? We are using Fuji.

9 REPLIES 9

rodrigo16
Giga Contributor

Hi Prashanth,



I had the same problem: I created an import set table for testing and, when I wanted to remove it, I could not find the way to do it. There is no Delete button!



So I did it the hard way:


  1. Got the sys_id of the import set table (look for your import set table in Tables and select Copy sys_id from the menu).
  2. Got myself elevated privileges and wrote the following background script:
    • var ist = new GlideRecord("sys_db_object");

      ist.get("SYS_ID_OF_IMPORT_SET_TABLE");


      ist.deleteRecord();



That did it!


Ulrich Jugl
ServiceNow Employee
ServiceNow Employee

Hey Prashanth,



look up the ImportSetCleaner script include. It contains the logic to clean import set tables, but also to drop the table, the maps and related modules/applications.



Best regards,


Ulrich


stephenhehr
Kilo Contributor

I had the same question, and here is what I did to remedy this issue.



You will need to delete the import set from the table.   To do this, you must first make sure that the import set is not tied to any transformation maps.   Then go to System Definitions --> Tables.   Then search for your import set.   Open it, and click delete.



CAUTION!!!! --- Make sure that this table is not used for anything else in you instance.



Hope this helps.


HD4
Kilo Expert

You should use System Import Sets --> Cleanup. Select the table to delete (add it to the list Delete these tables), make sure to CHECK Delete related transform maps and UNCHECK Delete data only (preserve table structure).

The system log will display the table drop etc.

Alex Cripps1
Tera Contributor

Thanks for the info