[Feature Request]: New Apache Hop transform: “Rule-based Set Values” (multi-rule IF/ELSE)
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 476
- Avg merge
- 18h 32m
- Merged PRs (30d)
- 216
Description
### What would you like to happen?
Context / Problem
I need a transform that applies conditional rules (IF/ELSE) to rows in a pipeline. It should evaluate one or more input columns and, when a condition matches, update the value of one or more target columns. Today this typically requires chaining multiple transforms, which becomes hard to maintain, audit, and evolve.
Goal
Create a declarative, rule-driven transform to update column values at runtime in a pipeline.
Functional requirements
Allow configuring an ordered list of rules.
Each rule must include:
Condition: a boolean expression using row columns (e.g., colA = 'X' OR colB = 'Y').
Actions: update 1..N columns with:
a constant value, and/or
the value of another column, and/or
an expression (optional, if supported).
Support rule application policy:
FIRST_MATCH: apply the first matching rule and stop.
ALL_MATCHES: apply all matching rules in order.
Handle null values and basic type conversions (string/number/date) according to target columns.
Provide clear configuration-time errors when a condition/action is invalid (e.g., missing column, type mismatch).
### Issue Priority
Priority: 3
### Issue Component
Component: Transforms
Contributor guide
Research direction
No files, tests, or entry points are named. Start by reviewing the existing transform configuration and validation conventions, then define how ordered rules, conditions, actions, nulls, and type conversions should work. Done means a configurable transform supports FIRST_MATCH and ALL_MATCHES, reports invalid configuration clearly, and is covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100