{"record":{"id":"0139cae898da7afc","repo":"apache/seatunnel","slug":"invalid-config-0139ca","errorCode":"INVALID_CONFIG","errorMessage":"Option `${optionName}` references unknown field `${fieldName}`. Available fields are ${fieldNames}","messagePattern":"Option `(.+?)` references unknown field `(.+?)`\\. Available fields are (.+?)","errorType":"error_code","errorClass":"SnmpConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-snmp/src/main/java/org/apache/seatunnel/connectors/seatunnel/snmp/sink/SnmpSinkRowConverter.java","lineNumber":97,"sourceCode":"        if (row.getArity() != rowArity) {\n            throw invalidRow(\n                    \"Input row arity \"\n                            + row.getArity()\n                            + \" does not match the configured schema arity \"\n                            + rowArity);\n        }\n\n        String oid = requireNonBlankRowValue(row, oidIndex, \"OID\");\n        String value = requireNonNullRowValue(row, valueIndex, \"value\");\n        String valueType = requireNonBlankRowValue(row, valueTypeIndex, \"value type\");\n        return new SnmpSetRequest(parseOid(oid), parseVariable(valueType, value));\n    }\n\n    private static int requireStringField(\n            SeaTunnelRowType rowType, String fieldName, String optionName) {\n        int index = rowType.indexOf(fieldName, false);\n        if (index < 0) {\n            throw invalidConfig(\n                    \"Option `\"\n                            + optionName\n                            + \"` references unknown field `\"\n                            + fieldName\n                            + \"`. Available fields are \"\n                            + Arrays.toString(rowType.getFieldNames()));\n        }\n        SeaTunnelDataType<?> dataType = rowType.getFieldType(index);\n        if (dataType.getSqlType() != SqlType.STRING) {\n            throw invalidConfig(\n                    \"Field `\"\n                            + fieldName\n                            + \"` configured by `\"\n                            + optionName\n                            + \"` must use STRING type, but was \"\n                            + dataType.getSqlType());\n        }\n        return index;","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-snmp/src/main/java/org/apache/seatunnel/connectors/seatunnel/snmp/sink/SnmpSinkRowConverter.java#L79-L115","documentation":"The SNMP sink requires that configured options (oid_field, value_field, value_type_field) name an existing field in the row schema. requireStringField looks the field up by name in the SeaTunnelRowType and throws INVALID_CONFIG when indexOf returns negative, listing the valid field names.","triggerScenarios":"Constructor SnmpSinkRowConverter(...) calls requireStringField(rowType, config.getOidField()/getValueField()/getValueTypeField(), ...) and the configured field name is not present in the sink table's SeaTunnelRowType.","commonSituations":"Typo in oid_field/value_field option values; renaming a source column without updating the sink config; case-sensitivity mismatches between config and schema; copying example configs without adapting field names.","solutions":["Set the option value to an exact field name from the sink table schema (see the 'Available fields' list in the message)","Fix typos or case mismatches between the config option and schema field names","Update the sink config after any upstream column rename","Validate the config against the schema in a pre-submit dry run"],"exampleFix":"// before\nsink {\n  SnmpSink {\n    oid_field = \"oid_col\"\n  }\n}\n// after\nsink {\n  SnmpSink {\n    oid_field = \"oid\"  // matches schema field\n  }\n}","handlingStrategy":"validation","validationCode":"// Java: verify option values against schema before constructing the converter\nfor (String f : List.of(config.getOidField(), config.getValueField(), config.getValueTypeField())) {\n    if (rowType.indexOf(f, false) < 0) {\n        throw new IllegalArgumentException(\"unknown field: \" + f\n            + \"; available: \" + Arrays.toString(rowType.getFieldNames()));\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    new SnmpSinkRowConverter(rowType, config);\n} catch (SeaTunnelException e) {\n    if (e.getMessage().contains(\"references unknown field\")) {\n        LOG.error(\"SNMP sink config field name mismatch; available fields: \"\n            + Arrays.toString(rowType.getFieldNames()), e);\n    }\n    throw e;\n}","preventionTips":["Copy field names directly from the schema definition, never retype them","Run a config dry-run/validation at job submit time","Update sink configs in the same change as column renames","Match the exact casing of schema fields in option values"],"tags":["snmp","sink","config","schema"],"backgroundTag":"missing-required-config-field","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"}