[Feature Request]: Support conditional expressions (if/ternary) in fields that currently only accept ${variable}
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 476
- Avg merge
- 18h 32m
- Merged PRs (30d)
- 216
Description
### What would you like to happen?
Many Hop dialog fields support variable substitution (${...}), but they don’t support computed/conditional values derived from other variables.
Today, when you want to parameterize pipelines by environment or mode (e.g., full load vs on-demand), you often need something like:
if ${VAR} = 10, then use 4, otherwise 6
The issue is that this currently requires extra steps (compute the value + set a variable), which increases complexity and leads to duplicated logic across pipelines.
The idea is to add support for expressions (including conditional logic) directly in configurable fields, in addition to simple ${variable} substitution.
Examples
if(${variable} = '10', 4, 6)
if(${mode}='X', 1, 9) (numeric result)
Note / motivation
I noticed this could significantly improve the pipeline authoring experience, especially in scenarios where the process switches between full extraction and on-demand runs. For example: if it’s a full load, I’d set X copies/threads; otherwise, I’d set a different value—without needing extra branches or helper steps just to achieve that.
We can bring this to the community to see if others find it valuable and whether it’s feasible to add to Hop. Low-code tools like Appsmith and Lowcoder already use this approach, and it generally makes parameterization much easier.
### Issue Priority
Priority: 3
### Issue Component
Component: Hop Gui
Contributor guide
Research direction
The issue names Hop GUI but no files, tests, or entry points. Start by locating how GUI fields currently perform ${variable} substitution and how their values are typed, then define the supported expression syntax and affected field types. Done means conditional expressions work for the stated string and numeric examples with coverage for valid and invalid input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100