Skip to main content
Pentaho Documentation

Create Step Plugins

A transformation step implements a data processing task in an ETL data flow. It operates on a stream of data rows. Transformation steps are designed for input, processing, or output. Input steps fetch data rows from external data sources, such as files or databases. Processing steps work with data rows, perform field calculations, and stream operations, such as joining or filtering. Output steps write the processed data back to storage, files, or databases.

This section explains the architecture and programming concepts for creating your own PDI transformation step plugin. We recommended that you open and refer to the sample step plugin sources while following these instructions.

A step plugin integrates with PDI by implementing four distinct Java interfaces. Each interface represents a set of responsibilities performed by a PDI step. Each of the interfaces has a base class that implements the bulk of the interface in order to simplify plugin development.

Unless noted otherwise, all step interfaces and corresponding base classes are part of the org.pentaho.di.trans.step package. 

Java Interface Base Class Main Responsibilities
StepMetaInterface BaseStepMeta
  • Maintain step settings
  • Validate step settings
  • Serialize step settings
  • Provide access to step classes
  • Perform row layout changes
StepDialogInterface org.pentaho.di.ui.trans.step.BaseStepDialog
  • Step settings dialog
StepInterface BaseStep
  • Process rows
StepDataInterface BaseStepData
  • Store processing state, and to declare and serve as a place for field variables during row processing

Using Your Icon in PDI   

Now that you have an image which provides a quick, intuitive representation of what your Step or Entry does and
maintains consistency with other user interface elements within PDI, you need to save it delete in the proper format and to the proper location.

Including Images in a Built-In Kettle Transformation or Job

  1. Save your icon to Scalable Vector Graphics (SVG) Version 1.1 format.
  2. If you want to include an image in a built-in Kettle transformation or job, do the following:  Place the SVG (and PNG) images in the pentaho-kettle/ui/packages-res/ui/images

  3. Edit the kettle-job-entries.xml or kettle-steps.xml file to point to the new icon file. This file is located inside of the {kettle-install}/lib/kettle-engine-VERSION.jar. This can be done like this:

<job-entry id="COPY_FILES"> <description>i18n:org.pentaho.di.job.entry:JobEntry.CopyFiles.TypeDesc</description> 

<classname>org.pentaho.di.job.entries.copyfiles.JobEntryCopyFiles</classname> <category>i18n:org.pentaho.di.job:JobCategory.Category.FileManagement</category> 

<tooltip>i18n:org.pentaho.di.job.entry:JobEntry.CopyFiles.Tooltip</tooltip> <iconfile>ui/images/CPY.svg</iconfile> 

<documentation_url></documentation_url> <cases_url/> <forum_url/> </job-entry>

Including Images in a Kettle Plugin

  1. Save your icon to Scalable Vector Graphics (SVG) Version 1.1 format.
  2. Place the image in the plugin.  The specifics of the plugin's assembly will indicate where to put the image, but usually it is placed in the your-plugin-project/src folder.  

  3. The image will be loaded, at runtime, from the plugin’s jar file.  The location of the file is indicated by the JobMeta or StepMeta for your plugin.  This is usually accomplished with a Java annotation, like in this example:

    @JobEntry( id = "HadoopCopyFilesPlugin", image = "HDM.svg", name = "HadoopCopyFilesPlugin.Name",
        description = "HadoopCopyFilesPlugin.Description",
        categoryDescription = "i18n:org.pentaho.di.job:JobCategory.Category.BigData",
        i18nPackageName = "org.pentaho.di.job.entries.hadoopcopyfiles" )
    public class JobEntryHadoopCopyFiles extends JobEntryCopyFiles {​
  4. If you have developed a dialog (UI) for your plugin, you might want an SVG graphic to appear, as per UX standards.  This code should be put in your plugin, in the Job or Step classes. This can be done like this:
    icon.setImage(UIResource.getInstance().getImage("ModelAnnotation.svg", getClass().getClassLoader(), ConstUI.ICON_SIZE, ConstUI.ICON_SIZE));