I have one Kettle job which will get data from database X and copy the data to another database Y.
I have used some Kettle jars to run this job from java and its working fine.
Now, my requirement is, how can i pass Database name to job from java dynamically?
Example:
String filename = "myJob.kjb";
KettleEnvironment.init();
JobMeta jobMeta = new JobMeta(filename, null);
jobMeta.setParameterValue("TEST_DB", "MyDatabase");
jobMeta.setInternalKettleVariables();
Job job = new Job(null, jobMeta);
job.start();
job.waitUntilFinished();