简体   繁体   中英

how to dynamically configure variables in transformation in Kettle Job from Java

In kettle I have one job. The Job is having 2 KTRs. The job needs to be invoked from Java call. First KTR is having first step as MongoDBInput . The query expression for step needs to be passed as input from java.

        KettleEnvironment.init();
        JobMeta jobMeta = new JobMeta("E:\\Job.kjb", null);
        Job job = new Job(null, jobMeta);

How do i set the variable from java?

Can be done using:

 Job job = new Job(null, jobMeta);                  
jobMeta.setParameterValue("inputParam", "urParam");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM