Automatically remove records from table IF NOT updated on latest load
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 01:56 AM
Hello,
I have a requirement that after a full load is done into ServiceNow (from BI server) , we want to remove records not updated in the last import.
The issue is that IF mid-server goes down for some reason/import gets stuck, a lot of records are removed.
Script is very simple, it basically checks which records that are updated (sys_updated_on) and deletes the ones with no new value (the last 15 hours / load takes around 14h to complete).
Any ideas on how this can be accomplished without taking any risks of deleting records that should still remain?
I need to safeguard this in some way so that it will not by mistake delete records that are updated in the last import.
thanks