Skip to main content
Pentaho Documentation

Creating Partitioner Plugins

PDI uses partitioner plugins for its partitioning feature. Each partitioner plugin implements a specific partitioning method. 


File:/screenshot_mod_partitioning.png

For most applications, the Remainder of Division partitioner works well. On the rare occasion that an application would benefit from an additional partitioning method, this section explains how to implement them.

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

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

Package Interface Base Class Main Responsibilities
org.pentaho.di.trans Partitioner BasePartitioner
  • Maintain partitioner settings
  • Serialize partitioner enumerations
  • Provide access to dialog class
  • Assign rows to partitions during runtime
org.pentaho.di.ui.trans.step StepDialogInterface BaseStepDialog
  • Partitioner settings dialog

Additional Reading

A complete explanation of partitioning in Kettle, including sample transformations, is available here http://type-exit.org/adventures-with-open-source-bi/2011/09/partitioning-in-kettle/.