hop icon indicating copy to clipboard operation
hop copied to clipboard

[Bug]: Problem with formula in Apache HOP

Open EricTonissen opened this issue 1 month ago • 4 comments

Apache Hop version?

2.16.0

Java version?

17.0.7

Operating system

Windows

What happened?

I have next pipeline, which gives an error in type.

In the formula step I have 2 lines.

If I seperate this lines in 2 formula steps, I do not have a problem.

Image

tr_formula.txt

Issue Priority

Priority: 3

Issue Component

Component: Pipelines

EricTonissen avatar Dec 08 '25 14:12 EricTonissen

Hi, I traced the issue and found that it was caused when retrieving the conversion type. You can reproduce it simply by switching the order of PRIVACY and CARD in the formula.

.take-issue

leehaut avatar Dec 09 '25 01:12 leehaut

With reproduce, I think you meant this as a work-around.

The pipeline I added to the bug, was just a small sample of the real formula action.

Image

And there are more of these formula actions in the 12 years of Pentaho transformations.

I hope this could be fixed.

EricTonissen avatar Dec 09 '25 08:12 EricTonissen

For context: the Formula transform in Apache Hop uses Apache POI (the library behind the Excel-like formulas in Apache OpenOffice). The Formula step in PDI/Kettle used the LibFormula library, which is not only discontinued (like all of Pentaho Reporting), but also used the LGPL license, which is incompatible with Apache's APL 2.0 license. As such, the Formula transform in Apache Hop is not a migration but a rewrite of the PDI Formula step. The formulas in Hop are largely (but not 100%) compatible with their PDI equivalents. The "not 100%" means some rework may be required.

bamaer avatar Dec 09 '25 09:12 bamaer

The problem is not about the used formula, but the handling per line of the formula action, and that is not related to the use of any library. I think. Because if you put each line in a seperate formula action, you do not have any problems.

EricTonissen avatar Dec 09 '25 09:12 EricTonissen