Deleting old records from import set

SD29
Tera Expert

Hi All,

I have a requirement where I need to delete the old records from the Import set before Inserting new records into the import set.

How can i do that ??

Thanks,

SD

13 REPLIES 13

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Snow,



Import set scheduled cleanup is a scheduled job that runs everyday at midnight. By default, it will query all import sets that are older than 7 days and delete the import set and all related tables, eg. the import set table records. If this scheduled job is not active on your instance, we recommend that you activate it as soon as possible to mitigate the growing import set tables that you may have, especially if they are recurring imports.


Import Set Scheduled Cleanup - ServiceNow Wiki


Hi pradeep,



I am aware about this OOB function, but if i need to run a import frequently in a day, that will stack up the records right. So, is there a way to delete the old records before Inserting the records everytime I run the Import?



Thanks,


SD


Hi Snow,



I would reconsider deleting import set records immediately. Many a times those are required for troubleshooting purpose.



https://<instance_name>/nav_to.do?uri=sysauto_script.do?sys_id=a060c407c0a8006f0067fef2befb357d



find_real_file.png




If I have to experiment, i would to that in my personal instance by checking how script include ImportSetCleaner works.


Based on that, I would consider to configure a schedule job which runs for specific import set table on daily basis.


Hello Deepak,



I am aware of this OOB scheduled job, If i need to do that for a particular import set table and clean that table every time before running an import how can i do that?



Thanks,


SD