{"record":{"id":"d14094e418f63add","repo":"apache/seatunnel","slug":"invalid-config-d14094","errorCode":"INVALID_CONFIG","errorMessage":"UPDATE mode requires at least one property field.","messagePattern":"UPDATE mode requires at least one property field\\.","errorType":"error_code","errorClass":"NebulaGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-nebulagraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/nebulagraph/sink/NebulaGraphRowConverter.java","lineNumber":60,"sourceCode":"final class NebulaGraphRowConverter {\n\n    private final SeaTunnelRowType rowType;\n    private final int vidIndex;\n    private final List<String> propertyNames;\n    private final List<Integer> propertyIndexes;\n\n    NebulaGraphRowConverter(NebulaGraphSinkConfig config, SeaTunnelRowType rowType) {\n        this.rowType = rowType;\n        this.vidIndex = fieldIndex(rowType, config.getVidField(), \"vid_field\");\n        validateVidType(rowType.getFieldType(vidIndex), config.getVidField());\n\n        List<String> configuredFields = config.getWriteFields();\n        if (configuredFields.isEmpty()) {\n            configuredFields = new ArrayList<>(Arrays.asList(rowType.getFieldNames()));\n            configuredFields.remove(config.getVidField());\n        }\n        if (config.getWriteMode() == NebulaGraphWriteMode.UPDATE && configuredFields.isEmpty()) {\n            throw invalid(\"UPDATE mode requires at least one property field.\");\n        }\n\n        this.propertyNames = new ArrayList<>(configuredFields.size());\n        this.propertyIndexes = new ArrayList<>(configuredFields.size());\n        for (String field : configuredFields) {\n            int index = fieldIndex(rowType, field, \"write_fields\");\n            validatePropertyType(rowType.getFieldType(index), field);\n            propertyNames.add(field);\n            propertyIndexes.add(index);\n        }\n    }\n\n    NebulaGraphVertex convert(SeaTunnelRow row) {\n        if (row.getArity() != rowType.getTotalFields()) {\n            throw invalid(\n                    \"Input row arity \"\n                            + row.getArity()\n                            + \" does not match the configured schema arity \"","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-nebulagraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/nebulagraph/sink/NebulaGraphRowConverter.java#L42-L78","documentation":"When write_mode = UPDATE, the NebulaGraph sink needs at least one property (non-VID) field to write. NebulaGraphRowConverter's constructor throws INVALID_CONFIG if the effective write_fields list ends up empty after defaulting to all schema fields minus the VID field.","triggerScenarios":"Using UPDATE mode with a row schema that contains only the VID field (no other columns), or write_fields explicitly set to an empty list in UPDATE mode.","commonSituations":"Schema defined with just an id column; user sets write_fields = [] believing it means 'all'; VID field is the only field after the VID is removed from the defaulted field list.","solutions":["Add at least one property column to the row schema","Explicitly configure write_fields with at least one non-VID field when using UPDATE","Switch to INSERT mode if only vertex IDs need to be written","Verify vid_field is not consuming the only column in the schema"],"exampleFix":"// before\nNebulaGraph {\n  write_mode = UPDATE\n  schema = {\n    fields { id: string }\n  }\n}\n// after\nNebulaGraph {\n  write_mode = UPDATE\n  schema = {\n    fields { id: string, name: string, age: int }\n  }\n}","handlingStrategy":"validation","validationCode":"List<String> fields = schema.getFieldNames();\nList<String> props = fields.stream().filter(f -> !f.equals(vidField)).collect(Collectors.toList());\nif (writeMode == UPDATE && props.isEmpty()) {\n    throw new IllegalArgumentException(\"UPDATE mode requires at least one non-VID field\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    sink.write(row);\n} catch (NebulaGraphConnectorException e) {\n    if (e.getErrorCode() == NebulaGraphConnectorErrorCode.INVALID_CONFIG) {\n        // add property fields or switch write_mode\n    }\n    throw e;\n}","preventionTips":["Ensure UPDATE-mode schemas include at least one property column","Never set write_fields to an empty list explicitly","Review schema vs write_mode pairing in config review"],"tags":["config","validation","nebulagraph","update-mode"],"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"}