pentaho/pentaho-kettle · error · RuntimeException
The function call getInputRowMeta doesn't require arguments.
Error message
The function call getInputRowMeta doesn't require arguments.
What it means
Argument-count guard in ScriptAddedFunctions for the getInputRowMeta added function. getInputRowMeta() takes no parameters; if the script passes any arguments the wrapper throws this RuntimeException instead of silently ignoring them.
Solutions
- Call getInputRowMeta() with an empty argument list: getInputRowMeta().
- If you intended to fetch a specific field, get the RowMeta via getInputRowMeta() and then look up the field from it.
- Search the script for getInputRowMeta( and remove any arguments passed.
Example fix
// before var meta = getInputRowMeta(0); // after var meta = getInputRowMeta();
Defensive patterns
Strategy: validation
Validate before calling
if (arguments.length !== 0) throw new Error('getInputRowMeta takes no arguments'); Try / catch
try { var meta = getInputRowMeta(); } catch (e) { if (String(e).indexOf('doesn\'t require arguments') !== -1) { /* fix call site: remove args */ } throw e; } Prevention
- Grep scripts for getInputRowMeta( and verify empty parens
- Don't confuse with createRowCopy(size), which takes one argument
When it happens
Trigger: Calling getInputRowMeta(...) with one or more arguments inside a Script transform script, e.g. getInputRowMeta(someField) or getInputRowMeta(null).
Common situations: Confusing getInputRowMeta() with functions that do take arguments (like createRowCopy(size)), or copy-pasted script code where the author assumed a parameter selects a field.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- The function call createRowCopy requires a single arguments…
- Unable to create a row copy:
- Unable to get the input row metadata because of an error:
- Unable to pass the new row to the next step(s) because of…
- Calculator.ErrorInStepRunning
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/e9bff61355507be5.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/script/ScriptAddedFunctions.java:1897
// Return the input row metadata
public static RowMetaInterface getInputRowMeta( ScriptEngine actualContext, Bindings actualObject,
Object[] ArgList, Object FunctionContext ) {
if ( ArgList.length == 0 ) {
try {
Object scmO = actualObject.get( "_step_" );
try {
Script scm = (Script) scmO;
return scm.getInputRowMeta();
} catch ( Exception e ) {
ScriptDummy scm = (ScriptDummy) scmO;
return scm.getInputRowMeta();
}
} catch ( Exception e ) {
throw new RuntimeException( "Unable to get the input row metadata because of an error: "
+ Const.CR + e.toString() );
}
} else {
throw new RuntimeException( "The function call getInputRowMeta doesn't require arguments." );
}
}
// Return the input row metadata
public static Object[] createRowCopy( ScriptEngine actualContext, Bindings actualObject, Object[] ArgList,
Object FunctionContext ) {
if ( ArgList.length == 1 ) {
try {
int newSize = (int) Math.round( (Double) ArgList[0] );
Object scmO = actualObject.get( "row" );
Object[] row = (Object[]) scmO; // TODO AKRETION ensure
return RowDataUtil.createResizedCopy( row, newSize );
} catch ( Exception e ) {
throw new RuntimeException( "Unable to create a row copy: " + Const.CR + e.toString() );
}
} else {View on GitHub (pinned to f3058517a1)