Skip to content

issue #3025: unique metadata injection keys for Simple Mapping - #7956

Merged
hansva merged 1 commit into
apache:mainfrom
mattcasters:issue-3025
Aug 15, 2026
Merged

issue #3025: unique metadata injection keys for Simple Mapping#7956
hansva merged 1 commit into
apache:mainfrom
mattcasters:issue-3025

Conversation

@mattcasters

Copy link
Copy Markdown
Contributor

What

Fixes the duplicate Metadata Injection keys on Simple Mapping (issue #3025). Input and output mappings share MappingIODefinition, so after the HopMetadataProperty migration the dialog showed two input_transform / output_transform rows and assigning one overwrote the other.

How

  • Add opt-in injectionKeyPrefix on @HopMetadataProperty. Serialization key() / groupKey() are unchanged.
  • Both injection engines (BeanInjectionInfo for the dialog, HopMetadataInjector for runtime) apply the prefix to descendant keys and group keys.
  • Simple Mapping uses INPUT_, OUTPUT_, and PARAMETERS_ prefixes so keys are unique.
  • Field mappings and parameter mappings are now injectable as list groups.

Compatibility

  • Pipeline XML/JSON is unchanged.
  • Other transforms keep their published MDI keys (injectionKeyPrefix defaults to empty).
  • Simple Mapping MDI was not usable before, so the new key names are not a regression.

Tests

  • Unit tests for prefixing and Simple Mapping injection.
  • MDI integration test 0061 injects from files/simple-mapping.xml and compares the generated pipeline to golden datasets.

Fixes #3025

Add an opt-in injectionKeyPrefix on HopMetadataProperty so reused nested
types get distinct MDI keys without changing XML/JSON serialization.
Simple Mapping now prefixes input, output, and parameter mappings, with
unit tests and MDI integration test 0061.
@hansva
hansva merged commit 2dcc68b into apache:main Aug 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: non-unique key-value mapping for simple mapping transformation when using metadata injection transformation

2 participants