In the previous article, the kettle platform and the Internet of Things platform were combined to perfectly solve the data format conversion problem. However, in the actual use process, there are still some problems that are not convenient enough. For some special business logic, it is more troublesome to deal with, but it is the simplest to use Java language for coding.

Using Java nodes in the Kettle

The following Java nodes are used:

The result is as follows: the value of the test variable is 2222, which is implemented in Java code.

Concrete implementation:

Official examples:

  • Use lambda expressions in Java nodes

Key code: Define lambda methods

Using the lambda method:

Final result:

Official documents:

Help.pentaho.com/Documentati…

Conclusion:

This article briefly describes how to use Java nodes in the Kettle. For details, see the official documents. Later articles will use Java nodes to solve complex problems in development, starting with real business scenarios.