{"record":{"id":"5688fd119ea9617c","repo":"pentaho/pentaho-kettle","slug":"sftpput-log-destinatfoldernamefieldnamemissing","errorCode":null,"errorMessage":"SFTPPut.Log.DestinatFolderNameFieldNameMissing","messagePattern":"SFTPPut\\.Log\\.DestinatFolderNameFieldNameMissing","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/sftpput/impl/src/main/java/org/pentaho/di/trans/steps/sftpput/SFTPPut.java","lineNumber":315,"sourceCode":"  @VisibleForTesting\n  void checkRemoteFilenameField( String remoteFilenameFieldName, SFTPPutData data )\n    throws KettleStepException {\n    remoteFilenameFieldName = environmentSubstitute( remoteFilenameFieldName );\n    if ( !Utils.isEmpty( remoteFilenameFieldName ) ) {\n      data.indexOfRemoteFilename = getInputRowMeta().indexOfValue( remoteFilenameFieldName );\n      if ( data.indexOfRemoteFilename == -1 ) {\n        // remote file name field is set, but was not found\n        throw new KettleStepException( BaseMessages.getString(\n          PKG, \"SFTPPut.Error.CanNotFindField\", remoteFilenameFieldName ) );\n      }\n    }\n  }\n\n  @VisibleForTesting\n  void checkDestinationFolderField( String realDestinationFoldernameFieldName, SFTPPutData data ) throws KettleStepException {\n    realDestinationFoldernameFieldName = environmentSubstitute( realDestinationFoldernameFieldName );\n    if ( Utils.isEmpty( realDestinationFoldernameFieldName ) ) {\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"SFTPPut.Log.DestinatFolderNameFieldNameMissing\" ) );\n    }\n\n    data.indexOfMoveToFolderFieldName = getInputRowMeta().indexOfValue( realDestinationFoldernameFieldName );\n    if ( data.indexOfMoveToFolderFieldName == -1 ) {\n      // move to folder field is missing\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"SFTPPut.Error.CanNotFindField\", realDestinationFoldernameFieldName ) );\n    }\n  }\n\n  @VisibleForTesting\n  SFTPClient createSftpClient( String realServerName, String realServerPort, String realUsername,\n                               String realKeyFilename, String realPassPhrase )\n    throws KettleJobException, UnknownHostException {\n    return new SFTPClient( getTransMeta().getBowl(),\n      InetAddress.getByName( realServerName ), Const.toInt( realServerPort, 22 ), realUsername,\n      realKeyFilename, realPassPhrase );","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/sftpput/impl/src/main/java/org/pentaho/di/trans/steps/sftpput/SFTPPut.java#L297-L333","documentation":"Thrown by SFTPPut.checkDestinationFolderField when the configured 'destination folder field name' setting is empty after environment substitution. The step needs a field in the incoming row whose value names the remote folder to move uploaded files into; without a field name it cannot proceed. It is a configuration error detected at runtime during processRow.","triggerScenarios":"The 'Move to folder field name' (destinationfolderFieldName) option is enabled in the SFTP Put step dialog but left blank, or it contains a variable that resolves to an empty string (e.g. ${UNSET_VAR}).","commonSituations":"Importing a transformation where the variable used for the field name was never defined in kettle.properties or the transformation's variables; copying a step config and clearing the field; toggling 'move to folder' on without filling the field name.","solutions":["Open the SFTP Put step dialog and enter a valid incoming field name in the destination folder field name box","Define the environment variable used there (kettle.properties or transformation settings) so it resolves to a non-empty value","If you do not want folder moving, disable the 'move to folder' option instead of leaving the field blank"],"exampleFix":"// before: field name left as an unresolved variable\nString destFolderField = \"${DEST_FOLDER_FIELD}\"; // resolves to \"\"\n// after: verify before running the step\nif ( Utils.isEmpty( environmentSubstitute( destFolderField ) ) ) {\n  throw new KettleException( \"Set DEST_FOLDER_FIELD to an existing input field name\" );\n}","handlingStrategy":"validation","validationCode":"String resolved = transformationEnvironmentSubstitute( destFolderFieldName );\nif ( resolved == null || resolved.trim().isEmpty() ) {\n  throw new IllegalArgumentException( \"SFTP Put: destination folder field name must not be empty\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  step.processRow();\n} catch ( KettleStepException e ) {\n  if ( e.getMessage().contains( \"DestinatFolderNameFieldNameMissing\" ) ) {\n    logError( \"Set the destination folder field name in the SFTP Put dialog\" );\n  } else { throw e; }\n}","preventionTips":["Always fill the destination folder field name when 'move to folder' is enabled","Avoid variables in the field name setting, or ensure they are defined in kettle.properties","Preview upstream rows before running to confirm field availability"],"tags":["configuration","sftp","kettle"],"backgroundTag":"empty-required-field","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"}