To extend the standard PDI functionality, you may want to develop custom plugins. The instructions in this section address common extending scenarios, with each scenario having its own sample project. These folders of the sample code package contain sample projects. See the Get started with the sample PDI project section of this guide to learn how to access the sample code.
Create different types of plugins
Create icons for step or entry plugins
Depending on your plugin, you may need to create an icon to represent it's purpose. Learn more about how to create an icon that aligns with the design guidelines within PDI.
Prepare the PDI client for debugging by starting the PDI client JVM, which allows debug sessions and these types of arguments to be passed into the PDI client JVM.
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
The address argument can be any free port on your machine. This example uses port 1044.
If you are using Spoon.bat or spoon.sh to launch the PDI client, create a copy of the file and edit it to include the debugging parameters to the Java options near the bottom of the file. If you are using a Mac app, add the JVM parameters toWhen you start PDI client, debuggers connect on port 1044.
VMOptions key of “Data Integration 64-bit.app/Contents/Info.plist”or
“Data Integration 32-bit.app/Contents/Info.plist”respectively.
Launch a debug session.
Ensure that the PDI client is set up for debugging and running with the plugin deployed.
Connect the Eclipse debugger by creating a debug configuration for your plugin project. From the Run/Debug Configurations menu, create a new configuration for Remote Java Application.
Select your project, making sure the port matches the port configured in Step 1.
Decide whether you want to be able to kill the PDI client JVM from the debugger, then click Apply and Debug.
PDI uses property files for internationalization. Property files reside in the messages sub-package in the plugin JAR file. Each property file is specific to a locale. Property files contain translations for message keys that are used in the source code. A messages sub-package containing locale-specific translations is called a message bundle.
Consider the package layout of the sample job entry plugin project. It contains its
main Java class in the
and there is a message bundle containing the localized strings for the en_US locale.
Additional property files can be added using the naming pattern
messages_<locale>.properties. PDI core steps and job
entries usually come with several localizations. See the shell job entry messages package
for an example of more complete
The key to resolving localized strings is to use the
getString() methods of org.pentaho.di.i18n.BaseMessages.
conventions when using this class, which enables easy integration with the PDI translator tool.
All PDI plugin classes that use localization declare a private static
Class<?> PKG field, and assign
a class that lives one package-level above the message bundle package. This is often the main class of the plugin.
PKG field defined, the plugin then resolves its localized strings with a call to
BaseMessages.getString(PKG, “localization key”, ...
optional_parameters). The first argument helps PDI find the correct message bundle, the second argument is the
key to localize, and the optional parameters are injected into the localized string following the Java Message Format conventions.
Some strings are commonly used, and have been pulled together into a common
message bundle in org.pentaho.di.i18n.messages. Whenever
BaseMessages cannot find the key in the specified message bundle,
PDI looks for the
key in the common message bundle.
For an example, check the sample Job Entry plugin project, which uses this technique for localized string resolution in its dialog class.