apache / apache/hop

[Bug]: Linux HopRun ignores HOP_EMPTY_STRING_DIFFERS_FROM_NULL=Y while Windows HopRun honors it

Open
#7,677 7 comments 0 reactions 0 assignees View on GitHub
Hop Run Infrastructure P2
Dominant language
Java
Stars
1.5k
Forks
476
Avg merge
18h 32m
Merged PRs (30d)
216

Description

### Apache Hop version?

2.18.1

### Java version?

21

### Operating system

Linux

### What happened?

Environment
Apache Hop 2.18.1
Official Docker image (apache/hop:2.18.1)
Linux (Docker)
Windows 11
Java 21
SQL Server (Microsoft JDBC 13.4.0)
Summary

When running the same project and workflow:

Windows GUI preserves empty strings.
Windows hop-run preserves empty strings.
Linux hop-run (official Docker image) converts empty strings to NULL.

This occurs even though HOP_EMPTY_STRING_DIFFERS_FROM_NULL=Y is supplied through every supported mechanism we could identify.

Expected behavior

When

HOP_EMPTY_STRING_DIFFERS_FROM_NULL=Y

is configured,

empty strings ("") should remain empty strings during pipeline execution and be written to SQL Server as '', not NULL.

This is the behavior observed on Windows.

Actual behavior

On Linux using the official Docker image:

Empty strings become NULL.
Inside the pipeline:
Get Variables

reports

HOP_EMPTY_STRING_DIFFERS_FROM_NULL = N

despite every configuration source specifying Y.

Reproduction

Environment JSON contains

{
"variables": [
{
"name": "HOP_EMPTY_STRING_DIFFERS_FROM_NULL",
"value": "Y"
}
]
}

Docker also receives

-e HOP_EMPTY_STRING_DIFFERS_FROM_NULL=Y

and

-e HOP_CONFIG_OPTIONS="--config-file-set-variables=HOP_EMPTY_STRING_DIFFERS_FROM_NULL=Y"

The startup script confirms before Hop starts:

Shell variable:
HOP_EMPTY_STRING_DIFFERS_FROM_NULL=Y

Environment JSON:
"name": "HOP_EMPTY_STRING_DIFFERS_FROM_NULL"
"value": "Y"

Process environment:
HOP_EMPTY_STRING_DIFFERS_FROM_NULL=Y

However, inside the pipeline:

Get Variables

returns

HOP_EMPTY_STRING_DIFFERS_FROM_NULL = N
Behaviour comparison
Environment Get Variables Result
Windows GUI Y Empty strings preserved
Windows HopRun Y Empty strings preserved
Linux Docker HopRun N Empty strings become NULL
Minimal pipeline

A minimal pipeline consisting of

Generate Rows
(String field,
Set Empty String = Yes)
|
Table Output

writes

NULL

to SQL Server on Linux Docker.

The same pipeline writes

''

(empty string)

on Windows.

Additional investigation performed

Verified:

Same Hop version (2.18.1)
Same workflow
Same project
Same environment JSON
Same SQL Server JDBC driver
Same Java major version
Same SQL Server destination

Verified before pipeline startup:

HOP_EMPTY_STRING_DIFFERS_FROM_NULL=Y

Verified inside pipeline:

HOP_EMPTY_STRING_DIFFERS_FROM_NULL=N

Tried:

Docker ENV
Environment JSON
HOP_CONFIG_OPTIONS
Windows HopRun
Windows GUI
Linux HopRun

No configuration change caused Linux HopRun to honor the value.

Question

Is HOP_EMPTY_STRING_DIFFERS_FROM_NULL expected to work under Linux HopRun?

If so, is there another supported mechanism for configuring it in the official Docker image?

If not, this appears to be a Linux-specific inconsistency between Windows HopRun and Linux HopRun.

### Issue Priority

Priority: 2

### Issue Component

Component: Infrastructure, Component: Hop Run

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the minimal Generate Rows → Set Empty String → Table Output pipeline with the official apache/hop:2.18.1 Docker image, checking Get Variables for HOP_EMPTY_STRING_DIFFERS_FROM_NULL. Compare Linux HopRun with Windows HopRun using the listed environment, JSON, and HOP_CONFIG_OPTIONS settings; done means Linux reports Y and writes an empty string to SQL Server instead of NULL.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
cli, databases, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.