apache/seatunnel · error · SeaTunnelRuntimeException

COMMON-17

COMMON-17

Error message

'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type.

What it means

GravitinoTableSchemaConvertor.parseColumn() converts a Gravitino column JSON node into a SeaTunnel column. When the column's type node is missing (null), it throws CommonError.convertToSeaTunnelTypeError (code COMMON-17), embedding the metalake identifier, the offending type ("null"), and the field name, because a column without a type cannot be mapped to a SeaTunnel data type.

Solutions

  1. Fix the Gravitino metadata so every column includes a valid "type" field
  2. Re-export the schema from Gravitino instead of using the hand-modified JSON
  3. Check the Gravitino server version and upgrade if its JSON schema output is incomplete
  4. Skip or default the offending column before feeding the JSON to the convertor

Example fix

// before
{"name": "amount", "nullable": true}
// after
{"name": "amount", "nullable": true, "type": "double"}
Defensive patterns

Strategy: validation

Validate before calling

for col in schemaJson.get("columns", []):
    if not col.get("type"):
        raise IllegalArgumentException("Column '" + col.get("name") + "' is missing 'type'")

Type guard

boolean hasType(JsonNode columnNode) {
    return columnNode != null && columnNode.hasNonNull("type");
}

Try / catch

try {
    Column column = convertor.convertor(schemaJson);
} catch (CommonError e) {
    if ("COMMON-17".equals(e.getErrorCode())) {
        log.error("Unsupported/missing Gravitino column type: {}", e.getMessage());
    }
    throw e;
}

Prevention

When it happens

Trigger: Parsing Gravitino table schema JSON where a column object lacks the "type" field (columnNode.get(TYPE) == null) — e.g. hand-edited or partially exported Gravitino metadata served to the convertor.

Common situations: Gravitino metadata exported by tools that omit type for computed/placeholder columns; corrupted or manually edited JSON catalogs; schema snapshots produced by older Gravitino versions with different serialization.

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/c67f03e9d2f85a71. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertor.java:153

            String catalogName, TablePath tablePath, TableSchema tableSchema) {
        TableIdentifier tableIdentifier = TableIdentifier.of(catalogName, tablePath);
        // Build catalog table
        return CatalogTable.of(
                tableIdentifier,
                tableSchema,
                new HashMap<>(),
                new ArrayList<>(),
                null,
                catalogName);
    }

    /** Parse a column node from Gravitino JSON. */
    private Column parseColumn(JsonNode columnNode) {
        String name = getTextValue(columnNode, NAME);
        boolean nullable = columnNode.has(NULLABLE) && columnNode.get(NULLABLE).asBoolean();
        JsonNode typeNode = columnNode.get(TYPE);
        if (typeNode == null) {
            throw CommonError.convertToSeaTunnelTypeError(
                    MetaLakeType.GRAVITINO.getType(), "null", name);
        }
        SeaTunnelDataType<?> dataType = convertGravitinoType(name, typeNode);
        // Extract column length and scale from type string
        // Returns null if the type doesn't support length/scale specification
        Long columnLength = null;
        Integer scale = null;
        if (typeNode.isTextual()) {
            Pair<Long, Integer> result = extractLengthAndScale(typeNode.asText());
            if (result != null) {
                columnLength = result.getLeft();
                scale = result.getRight();
            }
        }
        return PhysicalColumn.builder()
                .name(name)
                .dataType(dataType)
                .columnLength(columnLength)

View on GitHub (pinned to cf67b549a7)