Script transform fails at zero records #6866
Unanswered
ossDataEngineer
asked this question in
Q&A
Replies: 2 comments 2 replies
-
|
looks like a bug, this is handled differently (and cleaner) in the Javaacript transform. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi, do you have a minimal reproducible test case? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Hop Team,
I have designed a pipeline which uses Script transform to do some processing in groovy script. The pipeline fails when the pipeline source does not send any data (i.e 0 records) with the error as below,
2026/03/24 18:40:13 - poc_no_records_script_problem - Execution started for pipeline [poc_no_records_script_problem]
2026/03/24 18:40:13 - Process data.0 - ERROR: Couldn't execute this script! Error on position --> -1:-1 :
2026/03/24 18:40:13 - Process data.0 - ERROR: org.apache.hop.core.exception.HopValueException:
2026/03/24 18:40:13 - Process data.0 - Script error:
2026/03/24 18:40:13 - Process data.0 - groovy.lang.MissingPropertyException: No such property: data for class: Script21
2026/03/24 18:40:13 - Process data.0 -
2026/03/24 18:40:13 - Process data.0 - at org.apache.hop.pipeline.transforms.script.Script.addValues(Script.java:372)
2026/03/24 18:40:13 - Process data.0 - at org.apache.hop.pipeline.transforms.script.Script.processRow(Script.java:650)
2026/03/24 18:40:13 - Process data.0 - at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:54)
2026/03/24 18:40:13 - Process data.0 - at java.base/java.lang.Thread.run(Thread.java:842)
2026/03/24 18:40:13 - Process data.0 - Caused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: data for class: Script21
2026/03/24 18:40:13 - Process data.0 - at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:334)
2026/03/24 18:40:13 - Process data.0 - at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:72)
2026/03/24 18:40:13 - Process data.0 - at org.apache.hop.pipeline.transforms.script.Script.evalScript(Script.java:422)
2026/03/24 18:40:13 - Process data.0 - at org.apache.hop.pipeline.transforms.script.Script.addValues(Script.java:304)
2026/03/24 18:40:13 - Process data.0 - ... 3 more
I set the script type to 'Transform Script'. Why does the script transform execute when there is no data triggering its execution? Why can't it skip the transform execution or atleast not abort.
Not sure if this is a bug.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions