Table data export
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Hello Team,
we have one table (hr_mapping) there are 80k + records in prod instance we want export & import this records into our lower instance can anyone suggest the best way to achieve this any schedule job script..? kindly help me in the script or any other best solution might me helpful to us
Regards
Shabbir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi @Shabbir1 ,
It is not advisable to export 80k records by using scheduled job, because script will loop over into 80k records to export it.
So you may consider to export as xml or csv and import into lower instance.
1) XML Export (Quick & Simple)
Use Export → XML from the list view
Import the XML file into the lower instance
Suitable if there are no complex references or dependencies
2) Export Set + Import Set (Best Practice)
Export data from Prod as CSV/XML
Load it into the lower instance using Import Sets
Transform Map helps control field mapping and avoid data issues.
If xml or csv export takes long time means, in the hr mapping table, consider a filter like(year wise or month wise or any other fields which splits you 80k records to some point means).
If this is useful...Please mark it as helpful.. Please Accept my solution...
Best Regards,
SIVASANKARI S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Import–export with transform will not give a proper result, as it creates new sys IDs for the records and in that case prod data is not same lower or vice versa
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi @DR Atul G-LNG,
If there is a concern about new sys_id values being created, we can export the existing data along with the sys_id by using the below parameter:
https://<your_instance>.service-now.com/hr_mapping_list.do?CSV&sysparm_default_export_fields=all
During import, we can then use sys_id as the coalesce field to ensure records are updated correctly instead of creating new ones. I believe this approach should work as expected.
If you find this helpful, please mark it as helpful.
Best regards,
Sivasankari S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi @Shabbir1
You can go to the Mapping Table list view.
However, if I’m not mistaken, out of the box you can only export 10,000 records at a time. To export more than that, you’ll need to update the input export property and increase the count — though this may impact performance temporarily.
Also, if you’re planning to clone this in the near future, this is the best option instead of moving data via CSV or JSON format
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
