apache / apache/hop

[Feature Request]: Default Resolver for Variables

Open
#5,787 9 comments 0 reactions 0 assignees View on GitHub
awaiting triage Hop Config Other P2
Dominant language
Java
Stars
1.5k
Forks
476
Avg merge
18h 32m
Merged PRs (30d)
216

Description

### What would you like to happen?

It would be very useful to implement a default resolver. This resolver would allow specifying a default value to use in case a variable is not set.

Examples:
- `${my-var}` not set → `#{default-resolver:${my-var}:123}` ⇒ 123
- `${my-var}` set to 0 → `#{default-resolver:${my-var}:123}` ⇒ 0

Default value can itself be a variable:
- `#{default-resolver:${my-var}:${my-var-default}}`

### Issue Priority

Priority: 2

### Issue Component

Component: Hop Config, Component: Other

Contributor guide

Open the contributing guide

Research direction

Start in the Hop Config variable-resolution entry points and trace how expressions such as `${my-var}` are currently handled. Define tests for an unset variable, a value of 0, and a variable used as the default; done means the requested `default-resolver` examples resolve to the documented values.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.