apache/seatunnel · error · Neo4jConnectorException

UNSUPPORTED_DATA_TYPE

UNSUPPORTED_DATA_TYPE

Error message

not supported data type: ${dataType}

What it means

convertType hit a SeaTunnel data type it has no conversion branch for when mapping a Neo4j driver Value to a Java value. The switch over dataType falls through to default and throws Neo4jConnectorException with code UNSUPPORTED_DATA_TYPE naming the offending dataType.

Source

Thrown at seatunnel-connectors-v2/connector-neo4j/src/main/java/org/apache/seatunnel/connectors/seatunnel/neo4j/source/Neo4jSourceReader.java:227

                final SeaTunnelDataType<?> valueType = ((MapType<?, ?>) dataType).getValueType();
                return value.asMap(v -> valueType.getTypeClass().cast(convertType(valueType, v)));
            case ARRAY:
                final SeaTunnelDataType<?> elementType =
                        ((ArrayType<?, ?>) dataType).getElementType();
                final List<?> list =
                        value.asList(
                                v -> elementType.getTypeClass().cast(convertType(elementType, v)));
                final Object array = Array.newInstance(elementType.getTypeClass(), list.size());
                for (int i = 0; i < list.size(); i++) {
                    Array.set(array, i, list.get(i));
                }
                return array;
            case INT:
                return value.asInt();
            case FLOAT:
                return value.asFloat();
            default:
                throw new Neo4jConnectorException(
                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
                        "not supported data type: " + dataType);
        }
    }
}

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Change the schema column to one of the supported types (string, boolean, tinyint/int/bigint, float/double, date, time, timestamp, map<string,T>, array<T>).
  2. Cast or serialize the value in Cypher (e.g. toString() / collect()) into a supported type.
  3. Split complex structures into primitive columns instead of nested ROW types.

Example fix

// before
columns = [{ name = address, type = row<city string, zip string> }]
// after
columns = [
  { name = address_city, type = string }
  { name = address_zip, type = string }
]
Defensive patterns

Strategy: validation

Validate before calling

Set<String> supported = Set.of("string","boolean","tinyint","smallint","int","bigint","float","double","date","time","timestamp","map<string,...>","array<...>");
columns.forEach(c -> { if (!supported.contains(c.type)) throw new IllegalArgumentException("unsupported: " + c.type); });

Try / catch

try {
  row = convertRecord(...);
} catch (Neo4jConnectorException e) {
  log.error("unsupported type {} for column conversion", e.getMessage());
  throw e;
}

Prevention

When it happens

Trigger: A schema column in the Neo4j source declares a type not handled by convertType's switch (e.g. ROW/map-like struct types or other complex types outside STRING/BOOLEAN/INT/LONG/DOUBLE/FLOAT/TIME/TIMESTAMP/DATE/MAP/ARRAY), reached via convertRecord, nested convertType, or list element conversion.

Common situations: Users copy a schema from a different connector supporting richer types (e.g. nested rows); a typo or unsupported type keyword in the columns definition; Neo4j graph values needing custom mapping.

Related errors


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