apache / hop

Hop Orchestration Platform
https://hop.apache.org/
Apache License 2.0
981 stars 350 forks source link

[Bug]: Database Join and Database Lookup do not change the field names if duplicate #3849

Open Hymmen opened 6 months ago

Hymmen commented 6 months ago

Apache Hop version?

2.8

Java version?

openjdk version "17.0.10" 2024-01-16

Operating system

Windows

What happened?

If a row enters one of the transforms “Database Join” and ”Database Lookup” which contains some of the same field names as are added by the transform than “show output fields” shows the duplicate fields with “_1” as field names, but the passed-on row is without the changed names, so that when you try to use the _1 name, you get something like the following error: Eigene Ergebnisse?.0 - ERROR: Unexpected error Eigene Ergebnisse?.0 - ERROR: org.apache.hop.core.exception.HopException: Eigene Ergebnisse?.0 - Fields 'LOESCHPROFIL_VERSION_1' used in the condition are not found in input from previous transforms Eigene Ergebnisse?.0 - Eigene Ergebnisse?.0 - at org.apache.hop.pipeline.transforms.filterrows.FilterRows.checkNonExistingFields(FilterRows.java:197) Eigene Ergebnisse?.0 - at org.apache.hop.pipeline.transforms.filterrows.FilterRows.processRow(FilterRows.java:80) Eigene Ergebnisse?.0 - at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:55) Eigene Ergebnisse?.0 - at java.base/java.lang.Thread.run(Thread.java:829)

The names with _1 are, in this case, selectable in “Filter Rows”, but not usable.

Issue Priority

Priority: 3

Issue Component

Component: Transforms

Hymmen commented 6 months ago

The error occurs in an imported PDI transformation. If I create a minimal test version in Hop the error does not appear. The two transforms are the same in the hpl files. I cannot identify yet, why the big pipeline fails with this error and and the small pipeline works.