Hello,
we are generating transformations using Java. Now we have a transformation that gets its data from a table input step:
// create the source step...
TableInputMeta tii = new TableInputMeta();
tii.setVariableReplacementActive(true);
tii.setDatabaseMeta(sourceDBInfo);
tii.setSQL(SQLQuery);
tii.setLazyConversionActive(true);
String fromstepid = registry.getPluginId(tii);
StepMeta fromstep = new StepMeta(fromstepid, SrcTabName,(StepMetaInterface) tii);
fromstep.setLocation(150, 100);
fromstep.setDraw(true);
fromstep.setDescription(SrcTabName);
transMeta.addStep(fromstep);
The problem here is that even that we can see that the "Replace variables in script?" variables is set (tii.setVariableReplacementActive(true)), then this does not apply for the variables in the database connection (we get "You need to specify a database connection." at runtime). If i open the transformation in Spoon, remove the "Replace variables in script?" flag and put it back, then it works also for the database connection.
Is it a feature or a bug? How can we generate set the "Replace variables in script?" to true so that also the DBconnection variables are replaced?
Br,
Jaanus


Reply With Quote