Overriding Process Flow File Locations
When you run a process flow using the Process Flow Executor command line tool, you can specify that the process flow should use different input and output files than those specified in the job referenced by the process flow. To do this, specify the Read from File or Write from File stage names along with the input or output file as the last arguments like this:
"<jobname>|<stagename>"="<filename>"
Where:
- JobName
- The name of a job referenced in the process flow.
- StageName
- The name of a Read from File or Write to File stage in the job as shown in the stage
label under the stage's icon in the dataflow. For example, if the input stage is labeled
"Read From File" you would
specify:
"Job1|Read From File"="file:C:/inputfile.txt"
If the input stage is labeled "Illinois Customers" you would specify:
"Job1|Illinois Customers"="file:C:/inputfile.txt"
- File
- The protocol and full path to the file. You must use forward slashes in file paths,
not backslashes. The protocol must be one of these:
- file:
- If the file is on the same machine as the Spectrum Technology Platform server,
start the path with the "file:" protocol. For example, on Windows specify
file:C:/myfile.txt
and on Linux specifyfile:/testfiles/myfile.txt
.Note: If the client and server are running on the same machine, you can use either the "file:" or "esclient:" protocol, but are likely to have get better performance using the "file:" protocol. - esclient:
- If the file is on the same machine as Process Flow Executor, start the path with
the "esclient:" protocol. For example, on Windows specify
esclient:C:/myfile.txt
and on Linux specifyesclient:/testfiles/myfile.txt
.Note: If the machine running process flow executor cannot resolve the host name of the Spectrum Technology Platform server, you may get an error "Error occurred accessing file". To resolve this issue, open this file on the server: SpectrumDirectory/server/conf/spectrum-container.properties. Set the spectrum.runtime.hostname property to the IP address of the server. - ftp:
- To use a file server defined in Spectrum Management Console, use this format:
ftp:NameOfFileServer/PathToFile
. For example,ftp://FS/testfiles/myfile.txt
where FS is a file server resource defined in Spectrum Management Console.
For example,
java -jar pflowexecutor.jar -r Flow1 -u Bob1234 -p "mypassword1" -h spectrum.example.com -s 8080 -w -d "%" -i 1 "Job1|Read from File"="file:C:/myfile_input.txt" "Job1|Write to File"="file:C:/myfile_output.txt"