{"record":{"id":"4959b855b332f537","repo":"pentaho/pentaho-kettle","slug":"the-function-call-getinputrowmeta-doesn-t-require-arguments-4959b8","errorCode":null,"errorMessage":"The function call getInputRowMeta doesn't require arguments.","messagePattern":"The function call getInputRowMeta doesn't require arguments\\.","errorType":"exception","errorClass":"RhinoRuntimeError","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/scriptvalues_mod/ScriptValuesAddedFunctions.java","lineNumber":1984,"sourceCode":"  // Return the input row metadata\n  public static RowMetaInterface getInputRowMeta( Context actualContext, Scriptable actualObject,\n    Object[] ArgList, Function FunctionContext ) {\n    if ( ArgList.length == 0 ) {\n      try {\n        Object scmO = actualObject.get( \"_step_\", actualObject );\n        try {\n          ScriptValuesMod scm = (ScriptValuesMod) Context.jsToJava( scmO, ScriptValuesMod.class );\n          return scm.getInputRowMeta();\n        } catch ( Exception e ) {\n          ScriptValuesModDummy scm = (ScriptValuesModDummy) Context.jsToJava( scmO, ScriptValuesModDummy.class );\n          return scm.getInputRowMeta();\n        }\n      } catch ( Exception e ) {\n        throw Context.reportRuntimeError( \"Unable to get the input row metadata because of an error: \"\n          + Const.CR + e.toString() );\n      }\n    } else {\n      throw Context.reportRuntimeError( \"The function call getInputRowMeta doesn't require arguments.\" );\n    }\n  }\n\n  // Return the input row metadata\n  public static Object[] createRowCopy( Context actualContext, Scriptable actualObject, Object[] ArgList,\n    Function FunctionContext ) {\n    if ( ArgList.length == 1 ) {\n      try {\n        int newSize = (int) Math.round( Context.toNumber( ArgList[0] ) );\n\n        Object scmO = actualObject.get( \"row\", actualObject );\n        Object[] row = (Object[]) Context.jsToJava( scmO, ( new Object[] {} ).getClass() );\n\n        return RowDataUtil.createResizedCopy( row, newSize );\n      } catch ( Exception e ) {\n        throw Context.reportRuntimeError( \"Unable to create a row copy: \" + Const.CR + e.toString() );\n      }\n    } else {","sourceCodeStart":1966,"sourceCodeEnd":2002,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/scriptvalues_mod/ScriptValuesAddedFunctions.java#L1966-L2002","documentation":"Arity guard for getInputRowMeta in the Rhino script-values step: the function takes no arguments. A non-empty argument list reaches the else-branch and throws; the row metadata itself is fetched from the bound ScriptValuesMod/ScriptValuesModDummy step.","triggerScenarios":"getInputRowMeta(row) or getInputRowMeta('x') — any non-empty argument list.","commonSituations":"Confusing with createRowCopy (which takes the new size); leaving an argument after refactoring; autocomplete inserting a placeholder.","solutions":["Call getInputRowMeta() with no arguments.","If you intended to resize/copy a row, use createRowCopy(newSize) instead.","Search the script for stray arguments on metadata accessor calls."],"exampleFix":"// before\ngetInputRowMeta(3);\n// after\nvar meta = getInputRowMeta();\nvar newRow = createRowCopy(3);","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { var m = getInputRowMeta(); } catch (e) { logError(e.message); }","preventionTips":["Call with no arguments.","Use createRowCopy(newSize) when you intended row resizing.","Check auto-completion output for stray placeholder arguments."],"tags":["javascript","argument-count","pentaho"],"backgroundTag":"invalid-argument","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}