Scenario 3: Calling a Job with context variables from a browser - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

This scenario describes how to call the Job you created in Scenario 2: Buffering output data on the webapp server from your browser with/without modifying the values of the context variables.

Type the following URL into your browser: http://localhost:8080//export_job/services/export_job3?method=runJob where "export_job" is the name of the webapp directory deployed in Tomcat and "export_job3" is the name of the Job.

Click Enter to execute your Job from your browser.

The Job uses the default values of the context variables: nb_lines and lastname, that is it generates three lines with the current date, first name and Ford as a last name.

You can modify the values of the context variables directly from your browser. To call the Job from your browser and modify the values of the two context variables, type the following URL:

http://localhost:8080//export_job/services/export_job3?method=runJob&arg1=--context_param%20lastname=MASSY&arg2=--context_param%20nb_lines=2.

%20 stands for a blank space in the URL language. In the first argument "arg1", you set the value of the context variable to display "MASSY" as last name. In the second argument "arg2", you set the value of the context variable to "2" to generate only two lines.

Click Enter to execute your Job from your browser.

The Job generates two lines with MASSY as last name.