apache/seatunnel · error · JdbcConnectorException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
Unexpected value:
What it means
Thrown by InceptorJdbcRowConverter.toExternal in the default branch of the array element type switch — the array element's SeaTunnel SQL type has no mapped JDBC writing path, so the row-to-statement conversion aborts with the unmapped value.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/inceptor/InceptorJdbcRowConverter.java:146
Object[] array = (Object[]) row.getField(fieldIndex);
if (array == null) {
statement.setNull(statementIndex, java.sql.Types.ARRAY);
break;
}
if (SqlType.TINYINT.equals(elementType.getSqlType())) {
Short[] shortArray = new Short[array.length];
for (int i = 0; i < array.length; i++) {
shortArray[i] = Short.valueOf(array[i].toString());
}
statement.setObject(statementIndex, shortArray);
} else {
statement.setObject(statementIndex, array);
}
break;
case MAP:
case ROW:
default:
throw new JdbcConnectorException(
CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
"Unexpected value: " + seaTunnelDataType);
}
} catch (Exception e) {
throw new JdbcConnectorException(
JdbcConnectorErrorCode.DATA_TYPE_CAST_FAILED,
"error field:" + rowType.getFieldNames()[fieldIndex],
e);
}
}
return statement;
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Flatten or cast MAP/ROW columns to supported scalar types upstream (e.g. via a transform) before sinking.
- Add support for the needed data types in InceptorJdbcRowConverter.toExternal and contribute upstream.
- Change the table schema so complex columns are serialized (e.g. as JSON strings) into supported Inceptor types.
Example fix
// before
field m map<string,int> # passed straight to Inceptor sink
// after (transform to string)
transform { plugin_name = "FieldMapper", ... } # or stringify map to JSON string first Defensive patterns
Strategy: validation
Validate before calling
// reject unsupported complex types before sinking
for (SeaTunnelDataType<?> t : rowType.getFieldTypes()) {
if (t.getSqlType() == SqlType.MAP || t.getSqlType() == SqlType.ROW) throw new IllegalArgumentException("Unsupported type for Inceptor sink: " + t);
} Type guard
boolean inceptorSupported(SqlType s) { return !(s == SqlType.MAP || s == SqlType.ROW); } Try / catch
try { converter.toExternal(schema, schema, row, ps); } catch (JdbcConnectorException e) { if (e.getErrorCode() == CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE) { /* flatten/map the complex column and retry */ } else throw e; } Prevention
- Flatten or stringify MAP/ROW columns before the Inceptor sink
- Keep sink schemas to scalar types supported by the Inceptor converter
- Add schema compatibility checks in pipeline config review
When it happens
Trigger: Writing rows to Inceptor where a column's SeaTunnel type is MAP, ROW, or falls into the default (unhandled) branch of the type switch in toExternal.
Common situations: Source schemas containing nested complex types (maps/structs) being sunk to Inceptor via JDBC; schema evolution introducing types the Inceptor converter doesn't handle.
Related errors
- UNSUPPORTED_DATA_TYPE
- DATA_TYPE_CAST_FAILED
- Operator EXTENSION requires a non-null ConditionExtension
- The jdbc url format is incorrect: ${url}
- Failed to get connection, interrupted while doing another at
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/673640445c023df4.
Report an issue: GitHub.