apache/seatunnel · error · UnsupportedOperationException

%s (%s) type doesn't have a mapping to the SQL database colu

Error message

%s (%s) type doesn't have a mapping to the SQL database column type

What it means

GenericTypeConverter.reconvert always throws UnsupportedOperationException with a message stating that the column's type has no mapping to a SQL database column type. reconvert() translates a SeaTunnel Column back into a database type definition; GenericTypeConverter has no reverse mappings, so any code path requiring DDL type generation from SeaTunnel types fails.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/GenericTypeConverter.java:195

            case Types.ROWID:
            default:
                log.warn(
                        "JDBC type {} ({}) not currently supported",
                        sqlType,
                        typeDefine.getNativeType());
        }
        return builder.build();
    }

    /**
     * Convert {@link Column} to an external system's type definition.
     *
     * @param column
     * @return
     */
    @Override
    public BasicTypeDefine reconvert(Column column) {
        throw new UnsupportedOperationException(
                String.format(
                        "%s (%s) type doesn't have a mapping to the SQL database column type",
                        column.getName(), column.getDataType().getSqlType().name()));
    }
}

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Pre-create the target table manually so SeaTunnel does not need to generate DDL (schema_save_mode = ERROR_WHEN_SCHEMA_NOT_EXIST or DESTINATION)
  2. Use a database with a dedicated JdbcDialect/TypeConverter that supports reconvert
  3. Upgrade SeaTunnel if a converter for your database was added later
  4. Implement a custom TypeConverter with reconvert mappings for your database

Example fix

// before
schema_save_mode = "CREATE_SCHEMA_WHEN_NOT_EXIST"  # triggers reconvert on GenericTypeConverter
// after
schema_save_mode = "ERROR_WHEN_SCHEMA_NOT_EXIST"  # create the table manually first
Defensive patterns

Strategy: fallback

Validate before calling

TypeConverter<BasicTypeDefine> tc;
try { tc = dialect.getTypeConverter(); } catch (UnsupportedOperationException e) { tc = null; }
if (tc == null || requiresDdlAutoCreate(tc))
    throw new IllegalArgumentException("Auto DDL unsupported for this DB; create tables manually and set schema_save_mode=ERROR_WHEN_SCHEMA_NOT_EXIST");

Try / catch

try {
    catalog.createTable(...); // triggers reconvert
} catch (UnsupportedOperationException e) {
    LOG.warn("Type reconvert unsupported; create table manually, then retry with DESTINATION/ERROR schema mode");
}

Prevention

When it happens

Trigger: Calling reconvert() on GenericTypeConverter — typically during auto table creation / schema_save_mode=CREATE_SCHEMA_WHEN_NOT_EXIST for a database that fell back to the generic dialect — with any Column whose reverse mapping is undefined.

Common situations: Auto-creating tables in an unsupported database where SeaTunnel must map SeaTunnel types to SQL DDL; enabling schema save mode on a DB without a dedicated type converter; writing DDL for exotic types through the generic dialect.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/e287a6be35f1f85b. Report an issue: GitHub.