Transferring a large number of records from table to table - best practice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 02:10 AM
Hi All,
Working with a couple of scoped applications, I have to transfer records from a table in one app to another (similar) table in a different app (on the same instance). There are around a million records, so I believe it would be best to process them in batches.
I was just wondering if there's a best practice approach to this?
Thanks,
Tim.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 02:17 AM - edited 07-04-2025 02:18 AM
Hi @Tim D Scott,
ensure that you will not lose any data - make sure that all the fields from the source table are existing in the target one, or think of some mapping between the fields.
Also, these fields must be of the same type (e.g. you cannot transfer a string field into a date field etc).
For such a data transfer, you might ask ServiceNow for assistance. Or I would consider to move them by smaller parts (by 100K or something) at after EOB (mornings, nights, weekends).
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 02:20 AM
@Tim D Scott,
And another thing - during the transfer, think of notifications and other dependent configurations. Imagine that you have a notification when a new record is created and then you will move million of records, it will be an apocalypse 😄 so don't forget about such things and eventually disable until it is completed...
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 02:25 AM - edited 07-04-2025 02:52 AM
Thanks Kamil, I had already thought about that, and will use the setWorkflow(false) method of the GlideRecord. It would definitely be apocalypse time if not 😄

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 02:26 AM
Thanks Kamil, I'm ok with the data mappings, it was really the batching I'm not sure about.