apache/seatunnel · error · org.apache.seatunnel.common.exception.SeaTunnelRuntimeException
COMMON-17
COMMON-17
Error message
'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type.
What it means
This error is thrown by Gbase8aTypeMapper.mapping() when converting a GBase 8a column's JDBC type to a SeaTunnel data type during source schema resolution. The mapper maps recognized GBase 8a types (numeric types, CHAR/VARCHAR, DATE/TIME/TIMESTAMP, TEXT -> PrimitiveByteArrayType, etc.); any type resolving to GBASE8A_UNKNOWN or otherwise unmatched hits the default branch and throws with the GBASE_8A identifier, the GBase type string, and the column name read from the JDBC metadata.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/gbase8a/Gbase8aTypeMapper.java:105
return BasicType.FLOAT_TYPE;
case GBASE8A_CHAR:
case GBASE8A_VARCHAR:
return BasicType.STRING_TYPE;
case GBASE8A_DATE:
return LocalTimeType.LOCAL_DATE_TYPE;
case GBASE8A_TIME:
return LocalTimeType.LOCAL_TIME_TYPE;
case GBASE8A_TIMESTAMP:
case GBASE8A_DATETIME:
return LocalTimeType.LOCAL_DATE_TIME_TYPE;
case GBASE8A_BLOB:
case GBASE8A_TEXT:
return PrimitiveByteArrayType.INSTANCE;
// Doesn't support yet
case GBASE8A_UNKNOWN:
default:
final String jdbcColumnName = metadata.getColumnName(colIndex);
throw CommonError.convertToSeaTunnelTypeError(
DatabaseIdentifier.GBASE_8A, gbase8aType, jdbcColumnName);
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Exclude or cast the offending column (from '<field>' in the message) in your source query: SELECT CAST(col AS VARCHAR) AS col ... so it maps to a supported type.
- Restrict the read to supported columns via the connector's column_list/query configuration.
- Upgrade SeaTunnel — the GBase 8a dialect may have gained mappings for the type.
- Extend Gbase8aTypeMapper.mapping() with a case for the unknown type, mapping it to a suitable SeaTunnel type (e.g. STRING or BYTES), and submit upstream.
Example fix
// before: GBase table has GEOMETRY column -> GBASE8A_UNKNOWN
source {
Jdbc {
url = "jdbc:gbase://host:5258/db"
table_path = "db.table"
}
}
// after: cast unsupported column in query
source {
Jdbc {
url = "jdbc:gbase://host:5258/db"
query = "SELECT id, name, ST_AsText(geom) AS geom FROM db.table"
}
} Defensive patterns
Strategy: validation
Validate before calling
-- Pre-flight: list column types for the GBase 8a table and confirm each maps to a scalar type SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'MY_TABLE'; -- Fail the pipeline early for spatial/LOB/unknown types not in: BIT,TINYINT,SMALLINT,INT,BIGINT, -- DECIMAL,FLOAT,DOUBLE,CHAR,VARCHAR,DATE,TIME,TIMESTAMP,TEXT
Type guard
// Java: check the JDBC-reported type before asking the mapper to convert
static boolean isSupportedGbase8aType(int jdbcType) {
switch (jdbcType) {
case Types.BIT: case Types.TINYINT: case Types.SMALLINT: case Types.INTEGER:
case Types.BIGINT: case Types.DECIMAL: case Types.NUMERIC: case Types.FLOAT:
case Types.DOUBLE: case Types.REAL: case Types.CHAR: case Types.VARCHAR:
case Types.DATE: case Types.TIME: case Types.TIMESTAMP: case Types.LONGVARCHAR:
return true;
default:
return false;
}
} Try / catch
try {
sourceReader.open(...);
} catch (SeaTunnelRuntimeException e) {
if (e.getMessage().contains("COMMON-17") && e.getMessage().contains("GBase8a")) {
// extract column name from message and rebuild query with CAST for that column
throw new IllegalArgumentException("Cast or exclude the reported GBase 8a column", e);
}
throw e;
} Prevention
- Inspect table DDL before syncing; GBase 8a GEOMETRY/XML/enum-like columns are not mappable.
- Cast problem columns in the source query (e.g. ST_AsText, CAST(... AS VARCHAR)).
- Pin and test the GBase JDBC driver version — type codes vary between drivers.
- Run a small sample sync to validate schema resolution before full runs.
When it happens
Trigger: Reading from GBase 8a via the JDBC source when the table contains a column whose JDBC/DB type is not recognized by Gbase8aTypeMapper — e.g. BLOB/LARGE-object variants not covered, DECIMAL/NUMERIC beyond handled precision mapping, spatial types, or unusual vendor-specific type codes reported by the driver.
Common situations: Syncing legacy GBase 8a tables that include spatial (GEOMETRY), XML, or rarely-used vendor types. Also occurs when a different/older GBase JDBC driver reports unexpected type names, or after adding new columns with types the connector never handled.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/5463b0352e17cf4f.
Report an issue: GitHub.