Inititial capital of a sentence

provided a sentence like:

neue Technologien zur Verkehrsoptimierung

should get a inital capital like:

Neue Technologien zur Verkehrsoptimierung

This can be achieved in Pentaho / Apache Hop by a java expression

text == null ? null : text.substring(0,1).toUpperCase() + text.substring(1)

from: https://forums.pentaho.com/threads/218295-Capitalize-first-letter-of-a-string/

Advertisement

Create URL for REST-query

When you want to query a REST API but have values that need url-encoding first, you can use a User Defined Java Expression:

Transformation with three steps:
Generate Rows
User Defined Java Expression
REST query
Generate URL to query Crossref REST API (Download: Transformation)

In this particular example it is necessary as PDI would throw the error (“Illegal character in path”) if you query the following URL unmodified from a string:

Concat Strings

There are several possibilities in Pentaho Data Integration to put together several fields:

a) Step: Concat fields

This step is very straightforward if you want to concat fields using the same separator:

Concat Last and First name to a field “person_p3”, with separator “, “

b) Step: Formula

Similar to Excel you can create a new string using your fields and ad hoc defined strings in the Formula step:

c) Step: User Defined Java Expression