apache/seatunnel · warning
Unsupported DuckDB type: {}, falling back to STRING
Error message
Unsupported DuckDB type: {}, falling back to STRING What it means
A fallback warning from DuckDBTypeConverter.convert: the incoming DuckDB type did not match any case in the converter's switch, so the column is mapped to BasicType.STRING_TYPE with length 255 (or the given length if positive). This keeps the pipeline running but may silently misrepresent the real type, and values that don't fit 255 chars can be truncated or rejected by the target.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/duckdb/DuckDBTypeConverter.java:186
break;
case DUCKDB_TIMESTAMP_WITH_TZ:
builder.dataType(LocalTimeType.OFFSET_DATE_TIME_TYPE);
break;
case DUCKDB_INTERVAL:
builder.dataType(BasicType.STRING_TYPE);
builder.columnLength(50L);
break;
case DUCKDB_ARRAY:
case DUCKDB_STRUCT:
case DUCKDB_MAP:
log.warn(
"Complex type {} mapped to STRING, consider using JSON serialization",
duckDBType);
builder.dataType(BasicType.STRING_TYPE);
builder.columnLength(lengthValue > 0 ? lengthValue : 65535);
break;
default:
log.warn("Unsupported DuckDB type: {}, falling back to STRING", duckDBType);
builder.dataType(BasicType.STRING_TYPE);
builder.columnLength(lengthValue > 0 ? lengthValue : 255);
}
return builder.build();
}
private void handleDecimalType(
PhysicalColumn.PhysicalColumnBuilder builder, BasicTypeDefine typeDefine) {
long precision =
typeDefine.getPrecision() != null ? typeDefine.getPrecision() : DEFAULT_PRECISION;
int scale = typeDefine.getScale() != null ? typeDefine.getScale() : DEFAULT_SCALE;
if (precision > MAX_PRECISION) {
log.warn(
"DECIMAL precision {} exceeds maximum {}, truncating to {}",
precision,
MAX_PRECISION,
MAX_PRECISION);View on GitHub (pinned to cf67b549a7)
Solutions
- Check the connector's DuckDB dialect for the supported type list and upgrade the SeaTunnel connector to a version covering the type.
- Explicitly cast the column to a supported type in your source SQL.
- If STRING is acceptable, raise the target column length in the sink schema to avoid truncation.
- File/verify an issue with Apache SeaTunnel to add the missing type mapping.
Example fix
// before SELECT u FROM events; -- u is UNION type, falls back to STRING(255) // after SELECT CAST(u AS VARCHAR) AS u FROM events; -- explicit, choose your own length
Defensive patterns
Strategy: validation
Validate before calling
// Before sync, list types and compare against supported DuckDB dialect types
DatabaseMetaData md = conn.getMetaData();
ResultSet rs = md.getTypeInfo();
while (rs.next()) { /* check each column type is in the supported set */ } Type guard
boolean isSupportedDuckDbType(String t) {
return DUCKDB_SUPPORTED_TYPES.contains(t.trim().toUpperCase());
} Prevention
- Keep the connector jar and DuckDB driver versions aligned with the DuckDB server version.
- Cast unknown/exotic types explicitly in the source SQL.
- Review sync logs for 'falling back to STRING' warnings and widen target column lengths.
- Report missing mappings upstream to SeaTunnel rather than accepting silent STRING fallback.
When it happens
Trigger: Schema conversion encounters a DuckDB type not enumerated in the dialect's supported list — typically new DuckDB types (e.g. newer UNION/BIT variants) or unusual metadata returned by the JDBC driver's getTypeInfo.
Common situations: Upgrading DuckDB to a version with new types while using an older SeaTunnel connector jar; reading exotic column types in catalog discovery; typos/odd type names in source definitions.
Related errors
- COMMON-19
- Complex type {} mapped to STRING, consider using JSON serial
- SQL_OPERATION_FAILED
- Failed connecting to the configured JDBC URL via JDBC.
- Invalid DuckDB JDBC url:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/76f10f6c1441dbd3.
Report an issue: GitHub.