{"record":{"id":"d2e086a7dcbb6a71","repo":"apache/seatunnel","slug":"get-field-failed","errorCode":"GET_FIELD_FAILED","errorMessage":"Can not get the field [${fieldName}] from source table","messagePattern":"Can not get the field \\[(.+?)\\] from source table","errorType":"error_code","errorClass":"PaimonConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/SchemaUtil.java","lineNumber":104,"sourceCode":"        schemaOptions.remove(PaimonSinkOptions.CHANGELOG_TMP_PATH);\n        if (!schemaOptions.isEmpty()) {\n            paiSchemaBuilder.options(schemaOptions);\n        }\n        if (StringUtils.isNotBlank(comment)) {\n            paiSchemaBuilder.comment(comment);\n        }\n        return paiSchemaBuilder.build();\n    }\n\n    public static Column toSeaTunnelType(BasicTypeDefine<DataType> typeDefine) {\n        return PaimonTypeMapper.INSTANCE.convert(typeDefine);\n    }\n\n    public static DataField getDataField(List<DataField> fields, String fieldName) {\n        Optional<DataField> firstField =\n                fields.stream().filter(field -> field.name().equals(fieldName)).findFirst();\n        if (!firstField.isPresent()) {\n            throw new PaimonConnectorException(\n                    PaimonConnectorErrorCode.GET_FIELD_FAILED,\n                    \"Can not get the field [\" + fieldName + \"] from source table\");\n        }\n        return firstField.get();\n    }\n}\n","sourceCodeStart":86,"sourceCodeEnd":111,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/SchemaUtil.java#L86-L111","documentation":"SchemaUtil.getDataField looks up a field by name in the Paimon table's DataField list and throws GET_FIELD_FAILED if no field matches. It signals that the expected column is absent from the source Paimon table schema.","triggerScenarios":"Calling the Paimon sink/source converter path with a field name that does not exist in the Paimon table's schema list.","commonSituations":"Schema evolution dropped the column; case-sensitive name mismatch; schema file/catalog points to an older table version; hard-coded field name in config.","solutions":["Check the actual Paimon table schema (catalog schema) and use the exact field name","Fix case sensitivity of the fieldName argument","Refresh/restore the table schema if it changed unexpectedly","Guard lookups with fields.stream().anyMatch before calling getDataField"],"exampleFix":"// before\nDataField f = SchemaUtil.getDataField(fields, \"Amount\"); // actual name is 'amount'\n// after\nDataField f = SchemaUtil.getDataField(fields, \"amount\");","handlingStrategy":"validation","validationCode":"Optional<DataField> f = fields.stream().filter(d -> d.name().equals(fieldName)).findFirst();\nif (!f.isPresent()) throw new IllegalArgumentException(\"Field missing from Paimon schema: \" + fieldName);","typeGuard":"DataField findOrNull(List<DataField> fields, String name) { return fields.stream().filter(d -> d.name().equals(name)).findFirst().orElse(null); }","tryCatchPattern":"try { DataField f = SchemaUtil.getDataField(fields, name); } catch (PaimonConnectorException e) { LOG.error(\"Field {} absent; schema fields={}\", name, fields.stream().map(DataField::name).collect(Collectors.toList())); throw e; }","preventionTips":["Log/echo the Paimon table schema at job start","Use exact field names from catalog metadata, not manual copies","Watch for schema evolution changing field names"],"tags":["paimon","schema","field-lookup"],"backgroundTag":"record-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}