apache/seatunnel · error · SeaTunnelRuntimeException
COMMON-17
COMMON-17
Error message
'${identifier}' unsupported convert type '${dataType}' of '${field}' to SeaTunnel data type. What it means
SqliteTypeMapper.mapping() converts a SQLite JDBC column type to a SeaTunnel type while reading. SQLite is dynamically typed; the mapper recognizes a fixed set of type constants. SQLITE_UNKNOWN (or any unrecognized type name) hits the default branch and throws CommonError.convertToSeaTunnelTypeError with the column name from ResultSetMetaData.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/sqlite/SqliteTypeMapper.java:169
case SQLITE_TIME:
case SQLITE_DATETIME:
case SQLITE_TIMESTAMP:
return BasicType.STRING_TYPE;
case SQLITE_TINYBLOB:
case SQLITE_MEDIUMBLOB:
case SQLITE_BLOB:
case SQLITE_LONGBLOB:
case SQLITE_VARBINARY:
case SQLITE_BINARY:
case SQLITE_LONGVARBINARY:
return PrimitiveByteArrayType.INSTANCE;
// Doesn't support yet
case SQLITE_UNKNOWN:
default:
final String jdbcColumnName = metadata.getColumnName(colIndex);
throw CommonError.convertToSeaTunnelTypeError(
DatabaseIdentifier.SQLITE, columnTypeName, jdbcColumnName);
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- ALTER TABLE / recreate the table with standard declared types (TEXT, INTEGER, REAL, BLOB, NUMERIC).
- Read from a view that casts the column, e.g. CREATE VIEW v AS SELECT CAST(col AS TEXT) AS col FROM t.
- Explicitly set the query to CAST the offending column in the connector's query config.
- Add a mapping case for the type in SqliteTypeMapper if it is safe to represent.
Example fix
// before: CREATE TABLE t (id INTEGER, price MONEY) // after CREATE TABLE t (id INTEGER, price NUMERIC);
Defensive patterns
Strategy: validation
Validate before calling
-- Audit SQLite declared types before reading
SELECT name, type FROM pragma_table_info('my_table');
-- ensure every 'type' is one of: TEXT, INTEGER, REAL, BLOB, NUMERIC Try / catch
try {
sourceReader.read();
} catch (SeaTunnelRuntimeException e) {
if (e.getMessage().contains("unsupported convert type")) {
// create a view with CAST(col AS TEXT) and point the connector at it
} else { throw e; }
} Prevention
- Always declare SQLite column types explicitly when creating tables.
- Avoid non-standard declared types (MONEY, NVARCHAR(20), etc.) in SQLite schemas.
- Query pragma_table_info as part of pipeline onboarding for new tables.
- Use CAST in the connector query for legacy untyped columns.
When it happens
Trigger: Reading a SQLite table whose declared column type is unrecognized (e.g. BLOB-ish/custom declared type like 'NVARCHAR(20)', 'MONEY', or empty declared type resolved to SQLITE_UNKNOWN).
Common situations: SQLite databases created by other tools using non-standard column declared types; untyped columns (declared with no type); migrating legacy SQLite schemas.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/74f2a56d5dff6615.
Report an issue: GitHub.