Cannot get multiple exports working to break up large exports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2014 01:11 PM
I have 249K location records and I want to export them in the batch limit of 10K. I am following the steps on the SNOW wiki to break up large batches.
I am able to export the first 10K records successfully using this syntax:
https://<instance name>.service-now.com/cmn_location_list.do?XML&ORDERBY=sys_id&sysparm_record_count=10000
But when I move to the next step and use this query:
https://<instance name>.service-now.com/cmn_location_list.do?XML&sysparm_query=sys_id%3Efffc7e6387822500f046fb2489434d16&ORDERBYsys_id&sysparm_record_count=10000
All that is returned is this (image below). Note: the sysid in the 2nd query is the last sysid of my first list. That is why I dropped the equal to portion of the query that is demonstrated on the wiki site. It seems easier to me just to grab the last sysid and use greater than in the next query to continue on pulling the next sequential data set until I have all 249 records.
I cannot figure out what I have wrong when I compare to the wiki example. Help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2014 02:58 PM
Darrin,
Try recopying your sys_id. I don't think you have the correct amount of characters:
fffc7e6387822500f046fb2489434d16
Never mind. I counted wrong. Sorry about that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2014 03:27 PM
Hi Chris, actually there was an issue with that sysid. That was not the correct sysid from my initial query. However I went back to the first query and retrieved the correct sysid for the last record. Now when I run the next query it only returns 1 result. So I stumped on this result now.
https://<instance name>.service-now.com/cmn_location_list.do?xml&ORDERBY=sys_id&sysparm_record_count=10000
https://<instance name>.service-now.com/cmn_location_list.do?XML&sysparm_query=sys_id%3Effd7e9e987f2a100f046fb2489434d80&ORDERBY=sys_id&sysparm_record_count=10000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2014 03:39 PM
I tried starting over and I notice several issues with the way these queries behave. When I open the xml file with excel (after saving the xml file locally) the records are not sorted by sysid. But when I try using the last sysid in that file without resorting the next query only pulls back 2900 records. So that tells me that the first query is not pulling the first 10K records based on a sysid sort.
Next I notice if I try to avoid any issues perhaps happening with xml pull I tried a csv extract. Interesting when I do that, it takes me directly to the list in SNOW and pulls back all 249K records even though I had 10K set as the limit in the query.
And advice on these troubles?