Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When we execute a transformation we typically load the ETL metadata that describes the workload.  This is handled by the TransMeta object.  Then we execute this workload with a transformation engine handled by the Trans object.  This means we first need to load a TransMeta object from XML (with a TransMeta constructor as described below where repository can be null) or from a repository

Code Block
// Initialize, load settings, plugins, ...
//
KettleEnvironment.init();

...

TransMeta transMeta = new TransMeta("/foo/bar/trans.ktr", repository);
Trans Trans = new Trans(transMeta);

// // The following will run the transformation in a separate thread.
//
trans.execute(arguments);

// If you want to wait until the transformation is finished...
//
trans.waitUntilFinished(); //

// If you want to know about the execution result.
//
Result result = trans.getResult();

...