{"record":{"id":"193f11bcd9b54cee","repo":"pentaho/pentaho-kettle","slug":"avroinput-error-nopathset","errorCode":"AvroInput.Error.NoPathSet","errorMessage":"AvroInput.Error.NoPathSet","messagePattern":"AvroInput\\.Error\\.NoPathSet","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/avro-format/core/src/main/java/org/pentaho/di/trans/steps/avro/input/AvroNestedReader.java","lineNumber":259,"sourceCode":"\n    for ( String part : avroInputField.getPathParts() ) {\n      if ( space == null ) {\n        avroInputField.getTempParts().add( part );\n      } else {\n        avroInputField.getTempParts().add( space.environmentSubstitute( part ) );\n      }\n    }\n  }\n\n  /**\n   * Initialize this field by parsing the path etc.\n   *\n   * @param outputIndex the index in the output row structure for this field\n   * @throws KettleException if a problem occurs\n   */\n  public void fieldInit(AvroInputField avroInputField, int outputIndex ) throws KettleException {\n    if ( Const.isEmpty( avroInputField.getAvroFieldName() ) ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"AvroInput.Error.NoPathSet\" ) );\n    }\n    if ( avroInputField.getPathParts() != null ) {\n      return;\n    }\n\n    String fieldPath = cleansePath( avroInputField.getAvroFieldName() );\n\n    String[] temp = fieldPath.split( \"\\\\.\" );\n    List<String> pathParts = new ArrayList<>();\n    avroInputField.setPathParts( pathParts );\n    for ( String part : temp ) {\n      pathParts.add( part );\n    }\n\n    if ( pathParts.get( 0 ).equals( \"$\" ) ) {\n      pathParts.remove( 0 ); // root record indicator\n    } else if ( pathParts.get( 0 ).startsWith( \"$[\" ) ) {\n","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/avro-format/core/src/main/java/org/pentaho/di/trans/steps/avro/input/AvroNestedReader.java#L241-L277","documentation":"fieldInit initializes one Avro output field. It first validates that avroInputField.getAvroFieldName() (the Avro path) is non-empty; an empty path means the field cannot be located in the record, so a KettleException with localized message 'AvroInput.Error.NoPathSet' is thrown.","triggerScenarios":"A configured Avro input field whose 'path in Avro record' (avroFieldName) is blank when init() calls fieldInit for each field.","commonSituations":"Adding a row to the fields grid but leaving the path column empty; fields created programmatically without setAvroFieldName; a failed XML/repository load that dropped path values.","solutions":["Set the Avro field path for every entry in the step's fields list","Remove empty/placeholder field rows from the mapping grid","Re-open the step dialog, fill all paths, and re-save the transformation"],"exampleFix":"// before\nAvroInputField f = new AvroInputField();\nf.setPentahoFieldName(\"out\"); // no avro path\n// after\nAvroInputField f = new AvroInputField();\nf.setPentahoFieldName(\"out\");\nf.setAvroFieldName(\"$.customer.name\");","handlingStrategy":"validation","validationCode":"for (AvroInputField f : fields) {\n  if (Const.isEmpty(f.getAvroFieldName())) {\n    throw new KettleException(\"Field '\" + f.getPentahoFieldName() + \"' has no Avro path set\");\n  }\n}","typeGuard":"boolean hasAvroPath(AvroInputField f) {\n  return f.getAvroFieldName() != null && !f.getAvroFieldName().trim().isEmpty();\n}","tryCatchPattern":"try {\n  nestedReader.init();\n} catch (KettleException e) {\n  logError(\"An Avro field mapping is missing its path: \" + e.getMessage());\n  setErrors(1);\n}","preventionTips":["Never leave the path column blank when adding mapping rows","Delete unused/placeholder mapping rows","Validate mappings programmatically before executing transformations built in code"],"tags":["pdi","avro","field-mapping"],"backgroundTag":"missing-required-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"}