Skip to content

Getting Started

Giles Lewis edited this page Nov 15, 2018 · 15 revisions

This Quick Start Guide assumes that you are using a personal Developer instance of ServiceNow with admin role, and a MySQL database named "sndm". You will need a copy of the JAR file sndml-3.n.n-mysql.jar. For other databases you will need to use a different JAR file and make adjustments to the connection profile.

You can download the JAR files from this location:

The ZIP file should contain JARs for MySQL, PostgreSQL, Oracle, and Microsoft SQL Server. For other databases you will need to provide an appropriate JDBC driver, and possibly modifications to the file templates.xml.

To use the Datamart Loader you need a properties file (connection profile) that looks like this:

servicenow.instance=dev00000
servicenow.username=admin
servicenow.password=secret
datamart.url=jdbc:mysql://localhost/sndm
datamart.username=admin
datamart.password=secret

You can specify the ServiceNow instance using an instance name, or a full URL.

servicenow.instance=https://dev00000.service-now.com

If you are using a database that supports schemas (e.g. Oracle or PostgreSQL) then you can also specify a schema.

datamart.schema=sndm

Be sure to verify that the designated database user has CREATE TABLE permissions.

To test Datamart Loader type the following command:

java -jar jarfile -p profile -t cmn_location

At this point you should see the loader issue a CREATE TABLE statement for cmn_location and it should start loading the table with data.If you run the loader a second time it will detect that cmn_location already exists, so no CREATE TABLE will be issued.

We chose cmn_location because it is typically a small. However, the command should work with any ServiceNow table.

The -t command line option is fine for testing connectivity or loading small tables. But in most cases you will want to create a YAML Configuration file which is specified with the -y command line option.

Option Argument type Description
‑p or ‑‑profile Java Properties file Connection parameters for database and ServiceNow instance
‑y or ‑‑config YAML configuration file List of tables to be synchronized and other configuration instructions
Clone this wiki locally