Quantcast
Channel: Pentaho Community Forums - BI Platform
Viewing all articles
Browse latest Browse all 2893

How to pass arguments or parameters to a Kettle job from an xaction

$
0
0
Problem description

You have an xaction that calls a kettle job. The Kettle job uses parameters or arguments whose values are set when the job is called, in this case from the xaction.
The xaction calls the Kettle job passing values received as inputs in its request.

Pass Kettle arguments

xaction inputs in request, passed to a job may be captured as arguments in a transformation without problem, at least in BI Server 4.8.0 GA (I've not tested it on newer releases).

Pass Kettle (named) parameters

xaction inputs in request, passed to a job may NOT be captured as named parameters in a job, at least in BI Server 4.8.0 GA (I've not tested it on newer releases). See BISERVER-10851 .

A simple test

I've uploaded a simple confirmation test.
Install and execute the xaction for example as this:

http://127.0.0.1:8080/pentaho//ViewAction?&solution=my_samples&path=xaction_kettle_param&action=sample.xaction&REQ_INPUT="This is REQ_INPUT actual value"

(modify solution and path to fit your case)

Specify any value for REQ_INPUT. See BI Server log to note the specified value is being captured as a Kettle argument, but not as a named parameter.
Try to change xaction input name from REQ_INPUT to P_PARAM1 (like the named parameter defined in job), with identical result.

action_sequence_call.jpg

The workaround

The workaround is simple: develop a wrapper job that captures the xaction input as an argument, assigns it to job parameter, and then calls your real job.

comments ? suggestions ?
Attached Images
Attached Files

Viewing all articles
Browse latest Browse all 2893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>