apache/seatunnel · error · SeaTunnelRuntimeException
COMMON-17
COMMON-17
Error message
'${identifier}' unsupported convert type '${dataType}' of '${field}' to SeaTunnel data type. What it means
TeradataTypeMapper.mapping() maps a Teradata JDBC column type to a SeaTunnel type while reading. Unmapped Teradata type constants (e.g. INTERVAL, PERIOD, XML, JSON, ST_GEOMETRY) fall to default and throw CommonError.convertToSeaTunnelTypeError, including the Teradata type name and column name.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/teradata/TeradataTypeMapper.java:95
return new DecimalType(
metadata.getPrecision(colIndex), metadata.getScale(colIndex));
case TERADATA_CHAR:
case TERADATA_VARCHAR:
case TERADATA_CLOB:
return BasicType.STRING_TYPE;
case TERADATA_BYTE:
case TERADATA_VARBYTE:
case TERADATA_BLOB:
return PrimitiveByteArrayType.INSTANCE;
case TERADATA_DATE:
return LocalTimeType.LOCAL_DATE_TYPE;
case TERADATA_TIME:
return LocalTimeType.LOCAL_TIME_TYPE;
case TERADATA_TIMESTAMP:
return LocalTimeType.LOCAL_DATE_TIME_TYPE;
default:
final String jdbcColumnName = metadata.getColumnName(colIndex);
throw CommonError.convertToSeaTunnelTypeError(
DatabaseIdentifier.TERADATA, teradataType, jdbcColumnName);
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Cast unsupported columns in the source query, e.g. SELECT CAST(p AS VARCHAR(100)) AS p FROM t.
- Create a Teradata view that casts/excludes unsupported columns and read from the view.
- Select only supported columns in the connector query config.
- Add a mapper case (e.g. INTERVAL -> STRING) and contribute upstream if support is needed.
Example fix
// before: SELECT * FROM emp (has PERIOD col) // after SELECT emp_id, CAST(dur AS VARCHAR(80)) AS dur_str FROM emp
Defensive patterns
Strategy: validation
Validate before calling
-- Detect unsupported Teradata column types before reading
SELECT ColumnName, ColumnType
FROM dbc.ColumnsV
WHERE DatabaseName = 'MYDB' AND TableName = 'MYTABLE'
AND ColumnType IN ('IV','IP','XML','JSON','ST','PM','UD'); Try / catch
try {
sourceReader.read();
} catch (SeaTunnelRuntimeException e) {
if (e.getMessage().contains("unsupported convert type")) {
// rewrite query with CAST(unsupported_col AS VARCHAR(n)) and retry
} else { throw e; }
} Prevention
- Check dbc.ColumnsV when onboarding Teradata tables to pipelines.
- Replace PERIOD/INTERVAL columns with start/end scalar columns in ETL-facing views.
- Cast XML/JSON/spatial columns to VARCHAR in the read query.
- Prefer views over raw table reads for legacy Teradata schemas.
When it happens
Trigger: Reading a Teradata table containing a column whose type constant has no case in the mapper switch — commonly TERADATA_INTERVAL, TERADATA_PERIOD, TERADATA_XML/JSON, or spatial types.
Common situations: Migrating legacy Teradata warehouses that use PERIOD/INTERVAL columns; tables with XML or ST_GEOMETRY columns; UDT columns in Teradata.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/fdda1381f7f3d4a4.
Report an issue: GitHub.