-
Notifications
You must be signed in to change notification settings - Fork 19
Run Modes
When you run SNDML, you must specify two command line options.
--profile
filename
plus one of the following
--yaml filename
--table tablename
--scan
--daemon
--jobrun sys_id
--server
--jobrun
and --server
are new in version 3.5.
Loads a list of tables as specified in YAML Configuration.
Simple table loader. This mode is not intended for production use since it provides limited options for configuring the table loader. However, it can be handy for testing connectivity or performing a quick load of a small table. You can optionally specify an encoded query with --filter "encodedquery"
.
Scan for and run all jobs which are in Ready state. After a job completes, the system will scan for additional jobs in Ready state. If there are no remaining jobs in Ready state then the program will terminate.
Similar to --scan
, but the program runs in an endless loop. After performing a scan the program sleeps for some number of seconds (as configured in the Connection Profile 3.5) and then terminates.
New in 3.5. Executes a single load job, and then terminates. The sys_id
of the Job Run record is specified as a command line argument.
The --jobrun <sys_id>
command line option is designed for use when SNDML is installed on a MID Server. In this scenario, the DataPump App executes a PowerShell (for Windows) or Bash (for Linux) script on the MID Server as soon the Job Run is placed in a Ready
state. The script executes a Java program (SNDML), passing in the sys_id
of the Job Run as an argument. SNDML runs that single job and then shuts down. In this case the Agent configuration will look like this:
New in 3.5. Run as an HTTP Server. The program listens on a TCP/IP port for requests from the scoped app, and executes each job in a separate thread.
The --server
command line option implements com.sun.net.httpserver.HttpServer
, which is a simple HTTP Server. The SNDML Server listens on a TCP port for jobs that are ready to run. The HTTP request contains the sys_id
of the Job Run record. SNDML then connects to the ServiceNow instance over a secure HTTPS connection (using credentials from the Connection Profile), and locates the Job Run record using the sys_id
. If the Job Run record is not found or is not in a Ready
state, then the HTTP request is rejected. If the Job Run is found then the Server responds with an OK
and starts running the job. All further communications occur over the secure HTTPS connections.
If the --server
command line option is used, then the HTTP port is specified in the Connection Profile as shown here:
server.port=5124
and also in the Agent configuration as shown here:
🟠 scoped app is NOT used
🟢 scoped app is required