{"record":{"id":"464b8b6a9a1d05d4","repo":"pentaho/pentaho-kettle","slug":"avroinput-error-nonexistentfield","errorCode":null,"errorMessage":"AvroInput.Error.NonExistentField","messagePattern":"AvroInput\\.Error\\.NonExistentField","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":657,"sourceCode":"\n    String part = avroInputField.getTempParts().remove( 0 );\n    if ( part.charAt( 0 ) == '[' ) {\n      throw new KettleException(\n        BaseMessages.getString( PKG, \"AvroInput.Error.InvalidPath\" ) + avroInputField.getTempParts() );\n    }\n\n    if ( part.indexOf( '[' ) > 0 ) {\n      String arrayPart = part.substring( part.indexOf( '[' ) );\n      part = part.substring( 0, part.indexOf( '[' ) );\n\n      // put the array section back into location zero\n      avroInputField.getTempParts().add( 0, arrayPart );\n    }\n\n    // part is a named field of the record\n    Schema.Field fieldS = s.getField( part );\n    if ( fieldS == null && !ignoreMissing ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"AvroInput.Error.NonExistentField\", part ) );\n    }\n    Object field = record.get( part );\n\n    if ( field == null ) {\n      if ( defaultSchema != null ) {\n        fieldS = defaultSchema.getField( part );\n      }\n\n      if ( fieldS == null || fieldS.defaultVal() == null ) {\n        return null;\n      }\n      field = fieldS.defaultVal();\n    }\n\n    Schema.Type fieldT = fieldS.schema().getType();\n    Schema fieldSchema = fieldS.schema();\n\n    if ( fieldT == Schema.Type.UNION ) {","sourceCodeStart":639,"sourceCodeEnd":675,"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#L639-L675","documentation":"Kettle exception thrown by convertToKettleValue when the current path part names a field that does not exist in the Avro record's schema (Schema.getField(part) returns null) and ignoreMissing is false. The configured path references a field absent from the data's schema.","triggerScenarios":"convertToKettleValue reaches a record and pops path part 'part'; record schema has no field with that name and the step is not configured to ignore missing fields.","commonSituations":"Schema evolution: the writer schema dropped or renamed a field after the transformation was configured; typos in the path (case-sensitive names); reading Avro files from a different producer than expected; field name differences between Avro write and read schemas.","solutions":["Correct the field name in the step's path so it matches the Avro schema exactly (names are case-sensitive).","Enable 'Ignore missing fields' in the Avro Input step if nulls are acceptable for absent fields.","Refresh the configured fields from the current file's schema; the schema may have changed (schema evolution).","If schemas vary by file, align the reader/writer schemas or use the default schema mechanism to supply fallback values."],"exampleFix":"// before\nField path: order.CreateDate   // field renamed\n// after\nField path: order.created_date","handlingStrategy":"validation","validationCode":"// Check the path's leaf field exists in the file's schema before processing\nSchema.Field f = recordSchema.getField(lastPathPart);\nif (f == null && !ignoreMissing) {\n  throw new IllegalArgumentException(\"Field '\" + lastPathPart + \"' not in schema; refresh field definitions\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  value = reader.convertToKettleValue(record, schema, field);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"NonExistentField\")) {\n    logBasic(\"Field missing in current file schema; emitting null (or enable Ignore Missing)\");\n    value = null;\n  }\n}","preventionTips":["Re-discover fields whenever input files may come from a new schema version","Enable 'Ignore missing fields' for tolerant pipelines over evolving data","Field names are case-sensitive — copy them exactly from the schema"],"tags":["avro","schema-evolution","field-not-found"],"backgroundTag":"resource-not-found","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"}