I am trying to learn how to write an input step plugin, which writes "hello world". I have issues in the Step class. I have serious problems writing down the processRow function as all the tutorials assume the step to have some input and use getRow ... and inherit the meta structure from the input:
Here's my class (without the processRow body):
public class Test001Plugin extends BaseStep implements StepInterface {
private Test001PluginMeta meta;
private Test001PluginData data;
public Test001Plugin(StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
Trans trans) {
super(stepMeta, stepDataInterface, copyNr, transMeta, trans);
}
public boolean init(StepMetaInterface smi, StepDataInterface sdi) {
// Casting to step-specific implementation classes is safe
try{
meta = (Test001PluginMeta) smi;
data = (Test001PluginData) sdi;
if ( super.init(meta, data))
{
return true;
}
else return false;
} catch ( Exception e ) {
setErrors( 1L );
logError( "Error initializing step", e );
return false;
}
}
@SuppressWarnings("deprecation")
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
}
}
May you help me complete the code? or forward me to the appropriate tutorial?
Best Regards