apache/seatunnel · error · HugeGraphConnectorException

INVALID_GRAPH_SCHEMA

INVALID_GRAPH_SCHEMA

Error message

Mapping[EDGE/%s]: Field '%s' specified in idFields not found in row schema. Available fields: %s

What it means

EdgeMapper.getFieldValues resolves each field listed in idFields (or sort keys) to a column index in the row schema. A field missing from fieldsIndex means the mapping references a column the incoming SeaTunnel row does not have, so INVALID_GRAPH_SCHEMA is thrown with the label and available fields.

Solutions

  1. Align idFields entries with actual upstream columns listed in 'Available fields' in the message
  2. Fix the fields/ColumnMapping so the field exists in the row schema
  3. Check source_table routing: the row arriving may belong to a different table than assumed

Example fix

// before
id_fields = ["uid"]   // upstream column is "user_id"
// after
id_fields = ["user_id"]
Defensive patterns

Strategy: validation

Validate before calling

List<String> missing = idFields.stream()
    .filter(f -> !rowSchema.getFieldNames().contains(f))
    .collect(Collectors.toList());
if (!missing.isEmpty()) throw new IllegalArgumentException("id_fields not in schema: " + missing);

Type guard

boolean allPresent = idFields.stream().allMatch(schema.getFieldNames()::contains);

Try / catch

try { edgeMapper.map(row); } catch (HugeGraphConnectorException e) { if (e.getCode() == INVALID_GRAPH_SCHEMA) { log.error(e.getMessage()); /* fix id_fields or upstream schema */ } }

Prevention

When it happens

Trigger: Reading pkValues/stringValues/numberValues/uuidValues/getSortKeyValues for an EDGE mapping where an idFields/sortKey entry does not exist in the row's schema — typically a mismatch between upstream schema and fields mapping.

Common situations: Renaming a column upstream without updating id_fields; wrong table routed to the mapping in multi-table mode (source_table mismatch); case-sensitive field name typos.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/796cbc70c293c275. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/mapper/EdgeMapper.java:352

                Object uuidValue = uuidValues.get(0);
                if (isConsideredNull(uuidValue)) {
                    return null;
                }
                return UUID.fromString(String.valueOf(uuidValue));
            default:
                throw new HugeGraphConnectorException(
                        HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,
                        "Unsupported IdStrategy: " + strategy);
        }
    }

    private List<Object> getFieldValues(SeaTunnelRow row, List<String> fields) {
        List<Object> values = new ArrayList<>(fields.size());
        Map<String, String> fm = mappingConfig.getFieldMapping();
        for (String fieldName : fields) {
            Integer index = fieldsIndex.get(fieldName);
            if (index == null) {
                throw new HugeGraphConnectorException(
                        HugeGraphConnectorErrorCode.INVALID_GRAPH_SCHEMA,
                        String.format(
                                "Mapping[EDGE/%s]: Field '%s' specified in idFields not found in row schema. "
                                        + "Available fields: %s",
                                mappingConfig.getLabel(), fieldName, fieldsIndex.keySet()));
            }

            Object rawValue = row.getField(index);
            if (isConsideredNull(rawValue)) {
                continue;
            }

            String propName = fm.getOrDefault(fieldName, fieldName);
            PropertyKey propertyKey = propertyKeyCache.get(propName);

            if (propertyKey != null) {
                Object converted =
                        DataTypeUtil.convert(

View on GitHub (pinned to cf67b549a7)