You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by "CarlosJuncher03 (via GitHub)" <gi...@apache.org> on 2026/04/17 19:58:54 UTC

[I] [Feature Request]: Add conditional applicability per validation rule in Data Validator (hop)

CarlosJuncher03 opened a new issue, #7022:
URL: https://github.com/apache/hop/issues/7022

   ### What would you like to happen?
   
   Description
   Today, the Data Validator step applies each configured validation rule to every incoming row.
   
   In some cases, this creates unnecessary complexity in the pipeline. A common scenario is when most validation rules must be applied to all rows, but one or more specific rules should only be applied when a condition is met.
   
   For example:
   
   Validation A: apply to all rows
   Validation B: apply to all rows
   Validation C: apply only when a given field or business condition matches
   
   At the moment, the workaround is usually to split the flow with Filter Rows and use additional Data Validator steps. This works, but it makes the pipeline more verbose, harder to maintain, and can duplicate validation logic.
   
   Proposal
   Add an optional condition for each validation rule inside the Data Validator step.
   
   Suggested behavior:
   
   If no condition is defined, the validation rule applies to all rows
   If a condition is defined, that validation rule is evaluated only when the condition is true
   If the condition is false, that rule is skipped for the current row
   
   This is not a request to add general row filtering inside Data Validator.
   The goal is specifically to support conditional validation per rule.
   
   Example use cases
   
   Validate CPF only when person_type = 'F'
   Validate CNPJ only when person_type = 'J'
   Require cancellation date only when status = 'CANCELLED'
   Apply state-specific validation only when state = 'SP'
   
   Benefits
   
   Reduces the need for extra Filter Rows steps
   Reduces the need for duplicated Data Validator steps
   Keeps related validation rules together in one place
   Improves pipeline readability and maintainability
   Better supports business rules where some validations are only applicable in specific contexts
   
   Possible UI approach
   
   Add an optional field per validation rule, such as:
   
   Apply when
   Condition
   Validation condition
   
   If empty, the rule applies to all rows.
   
   Notes
   
   A key design point is to keep the feature scoped to rule applicability, not general flow control.
   This would preserve the current responsibility of the Data Validator step while making it more flexible for conditional business validations.
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Transforms


-- 
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: issues-unsubscribe@hop.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: Add conditional applicability per validation rule in Data Validator (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva commented on issue #7022:
URL: https://github.com/apache/hop/issues/7022#issuecomment-4271049601

   Never mind it's a filter inside the rules, that could make sense indeed 


-- 
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: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: Add conditional applicability per validation rule in Data Validator (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva commented on issue #7022:
URL: https://github.com/apache/hop/issues/7022#issuecomment-4271043833

   What if a row hits multiple rules with a specified destination? First rule takes precedence? 


-- 
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: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: Add conditional applicability per validation rule in Data Validator (hop)

Posted by "CarlosJuncher03 (via GitHub)" <gi...@apache.org>.
CarlosJuncher03 commented on issue #7022:
URL: https://github.com/apache/hop/issues/7022#issuecomment-4271141244

   In this case, the filter would indicate whether that row should be validated or not according to the rule. It maintains the standard data validator flow.


-- 
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: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org