It’s a fact. Data is pretty much everything. Extracting data, on the other hand, can be tricky and time-consuming.
That’s why we created a Data Extractor for ServiceNow. This tool pulls records into CSV files and is capable of exporting significant quantities of data without modifying ServiceNow’s export limits. It can even extract attachments and request item variables.
Understanding the Data Extractor
This is a tool written in Python, and in order to use it, you’ll need to be able to run Python scripts. The main algorithm is inside the file dataExport.py. In here, the code reads the tables configured in dataDefinitions.py, loops through each one, and downloads the following to CSV files:
- Table records
- Work notes and comments (from sys_journal_field)
- Assignment history (from sys_audit). You may need to increase the timeout setting for your REST calls for this to function properly.
- Mappings of users to their sys_ids, and mappings of groups to their sys_ids
- All variables and their values will be downloaded for the sc_req_item table
NOTE: You must have the exportItemVariables processor for this step, which is included in the repository.
- For some tables, approval history from sysapproval_approver will be downloaded
- All attachments
NOTE: You must have the exportAttachmentsToZip processor for attachments, which is included in the repository.
Getting Started with the Data Extractor
Important: To use the attachment and Request Item variable exports, you must import two processors to your ServiceNow instance. These processors can be found in this repository in the “Update Set for Processors.xml” file. Import this file into your instance, and it will create a retrieved update set for you to preview and commit.
Once completed, take these steps:
- Modify exportConfig.cfg to point to your instance with an admin user/password
- Modify the dataDefinitions.py file’s dataDict to have the tables/fields you want to export
- Run dataExport.py