arif-basri opened a new issue, #7003: URL: https://github.com/apache/hop/issues/7003
### Apache Hop version? 2.17.0 ### Java version? 17.0.18 ### Operating system Linux ### What happened? <img width="717" height="885" alt="Image" src="https://github.com/user-attachments/assets/04c18bb2-c1b4-411a-ab6a-4afba6a65923" /> <img width="724" height="864" alt="Image" src="https://github.com/user-attachments/assets/c783e943-4022-4a50-8c35-e2fff6f22953" /> ## What happened? When importing a Kettle/PDI `.ktr` file that contains a **Combination Lookup/Update** step configured to use a database sequence for technical key generation, the Hop importer produces an `.hpl` file that includes the sequence name in the XML — but **the Hop GUI does not load or display it**, leaving the sequence field blank in the transform dialog. Manually re-entering the sequence name in the dialog and saving causes Hop to rewrite the XML with the sequence in a different location. This confirms that the import produces an XML structure that the current `CombinationLookupMeta` loader does not read back. --- ### Steps to reproduce 1. In Kettle/PDI, create a transformation containing a **Combination Lookup/Update** step. 2. Configure the step: - Technical key field: `timeid` - Technical key creation method: **Sequence** - Sequence name: `time_seq` 3. Save as a `.ktr` file. 4. In Apache Hop, go to **File → Import → Kettle Import** and import the `.ktr`. 5. Open the resulting `.hpl` in the Hop GUI. 6. Open the **Combination Lookup/Update** transform dialog. **Result:** The sequence name field is blank. --- ### Imported `.hpl` — sequence is at the **transform level** (what the importer produces) ```xml <transform> <name>Combination lookup/update</name> <type>CombinationLookup</type> ... <fields> <return> <name>timeid</name> <creation_method>sequence</creation_method> <use_autoinc>N</use_autoinc> </return> </fields> <sequence>time_seq</sequence> <last_update_field/> ... </transform> ``` The sequence name `time_seq` is present in the file, but the GUI shows an **empty sequence field**. --- ### After re-entering the sequence in the GUI and saving — sequence is inside `<fields>` (what Hop expects) ```xml <transform> <name>Combination lookup/update</name> <type>CombinationLookup</type> ... <fields> <return> <creation_method>sequence</creation_method> <last_update_field/> <name>timeid</name> <use_autoinc>N</use_autoinc> </return> <sequence>time_seq</sequence> </fields> ... </transform> ``` --- ### Root cause The `CombinationLookup` metadata model stores `sequenceFrom` inside the `CFields` class, which is serialized under `<fields>`. The importer preserves the original Kettle/old-Hop flat structure where `<sequence>` sits at the transform level — a location the current `@HopMetadataProperty`-driven deserializer no longer reads for this transform. Key files involved: | File | Relevance | |---|---| | `plugins/misc/import/src/main/java/org/apache/hop/imports/kettle/KettleImport.java` | Importer — does not remap `<sequence>` into `<fields>` for `CombinationLookup` | | `plugins/transforms/combinationlookup/src/main/java/org/apache/hop/pipeline/transforms/combinationlookup/CFields.java` | Metadata model — owns `sequenceFrom` under `<fields><sequence>` | | `plugins/transforms/combinationlookup/src/main/java/org/apache/hop/pipeline/transforms/combinationlookup/CombinationLookupMeta.java` | Transform meta — no fallback to read `<sequence>` from transform level | --- ### Expected behavior After Kettle import, the sequence name is shown in the Hop GUI without any manual intervention. The fix should be **one or both** of: 1. **Importer fix:** for `CombinationLookup` transforms, move transform-level `<sequence>` into `<fields><sequence>` during import. 2. **Backward-compat loading:** `CombinationLookupMeta` reads `<sequence>` from the transform level as a fallback when `<fields><sequence>` is absent, so that both already-imported files and future imports are handled correctly. --- ### Additional notes - The same issue likely affects `last_update_field` on import (also emitted at the transform level by the importer, expected under `<fields><return><last_update_field>` by the current model). - This is a **silent** regression: the file looks correct, the import reports success, but configuration is silently ignored at load time. - The existing unit test fixture `plugins/transforms/combinationlookup/src/test/resources/combination-lookup-transform.xml` also places `<sequence/>` at the transform level. A test covering a non-empty sequence value would have caught this. ### Issue Priority Priority: 2 ### Issue Component Component: Hop Gui -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
