Configuring a Query Variable for Job Executor - 23.1

Spectrum Dataflow Designer Guide

Version
23.1
Language
English
Product name
Spectrum Technology Platform
Title
Spectrum Dataflow Designer Guide
First publish date
2007
Last updated
2024-05-09
Published on
2024-05-09T23:01:03.226155
Note: Ensure you have the Spectrum Job Executor downloaded to your server.
  1. Create a text file that defines the default values of the variables included in the SQL query of the Read From DB stage of the job.
    To assign a column name AGE as the default value to a variable condition1, create a text file, say variables.txt, and include the below line in the file:
    condition1=AGE
    To assign a constant value, say 20, as the default value to a variable condition1, include the below line in the file:
    condition1=20
  2. While running the job using the Job Executor on the command prompt, use the argument -o followed by the path to the created text file.
    For example, to run the job ReadCustomerDataJob, for which the default values of its variables have been defined in the text file variables.txt, run the below command on a command prompt:
    java -jar jobexecutor.jar -h "localhost" -u "admin" -p "admin" -s "8080" -j "ReadCustomerDataJob" -o "variables.txt"

On running the job using the Job Executor, the customized query is used to fetch the required data.

Note: For instructions and command-line syntax, see Running a Job in the Spectrum Dataflow Designer Guide.