{"record":{"id":"81ff63f4d8c4b1b6","repo":"pentaho/pentaho-kettle","slug":"propertyoutputmeta-log-filenameemty","errorCode":null,"errorMessage":"PropertyOutputMeta.Log.FileNameEmty","messagePattern":"PropertyOutputMeta\\.Log\\.FileNameEmty","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/propertyoutput/PropertyOutput.java","lineNumber":120,"sourceCode":"        data.filename = buildFilename();\n        // Check if filename is empty..\n        if ( Utils.isEmpty( data.filename ) ) {\n          logError( BaseMessages.getString( PKG, \"PropertyOutput.Log.FilenameEmpty\" ) );\n          throw new KettleException( BaseMessages.getString( PKG, \"PropertyOutput.Log.FilenameEmpty\" ) );\n        }\n        openNewFile();\n      }\n    } // end first\n\n    // Get value field\n    String propkey = data.inputRowMeta.getString( r, data.indexOfKeyField );\n    String propvalue = data.inputRowMeta.getString( r, data.indexOfValueField );\n\n    try {\n      if ( meta.isFileNameInField() ) {\n        data.filename = data.inputRowMeta.getString( r, data.indexOfFieldfilename );\n        if ( Utils.isEmpty( data.filename ) ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"PropertyOutputMeta.Log.FileNameEmty\" ) );\n        }\n        if ( !checkSameFile() ) {\n          // close previous file\n          closeFile();\n          // Open new file\n          openNewFile();\n        }\n      }\n\n      if ( !data.KeySet.contains( propkey ) ) {\n        if ( log.isDetailed() ) {\n          logDetailed( BaseMessages.getString( PKG, \"PropertyOutput.Log.Key\", propkey ) );\n          logDetailed( BaseMessages.getString( PKG, \"PropertyOutput.Log.Value\", propvalue ) );\n        }\n        // Update property\n        data.pro.setProperty( propkey, propvalue );\n        putRow( data.outputRowMeta, r ); // in case we want it to go further...\n        incrementLinesOutput();","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/propertyoutput/PropertyOutput.java#L102-L138","documentation":"Thrown in processRow when the step is configured with 'filename in field': the filename is read from the configured input row field, and if that field's string value is empty for the current row, the step cannot open a target file and throws this KettleException. Unlike error 1745 the filename source is the row data, not the static metadata setting.","triggerScenarios":"meta.isFileNameInField() is true and data.inputRowMeta.getString(r, data.indexOfFieldfilename) returns null/empty for a row — i.e. the filename field is missing, null, or contains \"\" in the incoming row.","commonSituations":"Upstream step emits null or empty values in the filename column; wrong field selected in the 'filename field' dropdown; a filtered/optional row stream where some rows legitimately have no file target.","solutions":["Fix the upstream step so the filename field is populated for every row (e.g. coalesce with a default path).","Check the 'filename field' selection in the step settings points at the correct column.","Filter out rows with null/empty filename before the Property Output step using a Filter rows step.","Catch KettleException in the transformation executor and log the offending row's field values to locate the bad data."],"exampleFix":"// before (upstream JavaScript/UDF)\nvar outFile = row.filename;\n// after\nvar outFile = (row.filename != null && row.filename.length > 0) ? row.filename : \"/data/default.properties\";","handlingStrategy":"validation","validationCode":"// before feeding rows to Property Output (filter step / UDF)\nif (filename == null || filename.trim().isEmpty()) {\n    // route row to an error stream or substitute a default path\n}","typeGuard":null,"tryCatchPattern":"try {\n    trans.execute(null);\n    trans.waitUntilFinished();\n} catch (KettleException e) {\n    if (e.getMessage().contains(\"FileNameEmty\")) {\n        // inspect upstream data for null/empty filename field\n    }\n}","preventionTips":["Add a Filter rows step to remove or default rows with empty filename before the step.","Double-check the 'filename field' dropdown selection after editing upstream step mappings.","Use a coalesce/default expression upstream so every row has a target path."],"tags":["pentaho-kettle","file-output","null-field","row-data"],"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"}