Search code examples
pentahokettle

Dynamically invoking KTRs from one KTR


I need to have one KTR which is used to invoke multiple KTRs. That base KTR should be connected to MongoDB and based on the mapping in MONGODB, I need to invoke the specific KTR. Am I supposed to use Sub Transformation mapping? but how will i configure which KTR to be invoked?


Solution

  • we need to have JOB instead of mapped Transformations. Just configure first KTR in your job, whatever is the output of that KTR, set it in a variable (using setVariable) and then configure second KTR. In second KTR, configure Transformation file name as ${VariableName}. It will dynamically invoke the required KTR configured in your first KTR.