Deleting old records from import set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 09:40 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 09:44 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 09:54 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 10:05 AM
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
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 10:37 AM
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