{"record":{"id":"1b7c50e46a5bd83f","repo":"apache/seatunnel","slug":"common-17-1b7c50","errorCode":"COMMON-17","errorMessage":"'${identifier}' unsupported convert type '${dataType}' of '${field}' to SeaTunnel data type.","messagePattern":"'(.+?)' unsupported convert type '(.+?)' of '(.+?)' to SeaTunnel data type\\.","errorType":"error_code","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/psql/PostgresTypeConverter.java","lineNumber":293,"sourceCode":"                    builder.scale(typeDefine.getScale());\n                }\n                break;\n            case PG_TIMESTAMP_TZ:\n                // timestamptz -> TIMESTAMP_TZ\n                builder.dataType(LocalTimeType.OFFSET_DATE_TIME_TYPE);\n                if (typeDefine.getScale() != null && typeDefine.getScale() > MAX_TIMESTAMP_SCALE) {\n                    builder.scale(MAX_TIMESTAMP_SCALE);\n                } else {\n                    builder.scale(typeDefine.getScale());\n                }\n                break;\n            default:\n                if (typeDefine.getSqlType() == Types.OTHER) {\n                    builder.dataType(BasicType.STRING_TYPE);\n                    builder.sourceType(typeDefine.getColumnType());\n                    break;\n                }\n                throw CommonError.convertToSeaTunnelTypeError(\n                        identifier(), typeDefine.getDataType(), typeDefine.getName());\n        }\n        return builder.build();\n    }\n\n    @Override\n    public BasicTypeDefine reconvert(Column column) {\n        BasicTypeDefine.BasicTypeDefineBuilder builder =\n                BasicTypeDefine.builder()\n                        .name(column.getName())\n                        .nullable(column.isNullable())\n                        .comment(column.getComment())\n                        .defaultValue(column.getDefaultValue());\n        switch (column.getDataType().getSqlType()) {\n            case BOOLEAN:\n                builder.columnType(PG_BOOLEAN);\n                builder.dataType(PG_BOOLEAN);\n                break;","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/psql/PostgresTypeConverter.java#L275-L311","documentation":"PostgresTypeConverter.convert() throws this when a PostgreSQL column type cannot be mapped to a SeaTunnel type. The default branch maps Types.OTHER columns to STRING, but any other unrecognized type falls through to CommonError.convertToSeaTunnelTypeError with the Postgres identifier.","triggerScenarios":"Reading a Postgres table whose column has a JDBC type not handled by convert() and not Types.OTHER — e.g. custom enum domains surfaced differently, geometric/JSON types on unhandled drivers, or PG array types the converter predates.","commonSituations":"Tables with custom types/extensions (postgis geometry on old drivers, custom composite types), or newer Postgres versions introducing types unknown to the connector; schema read fails during job initialization.","solutions":["CAST the offending column in the query (e.g. to TEXT or a numeric type)","Check the driver/SeaTunnel version — upgrade to one that handles the type","Wrap custom extension columns as TEXT (e.g. geometry::text)"],"exampleFix":"// before: SELECT geom FROM places (PostGIS geometry)\n// after\nString query = \"SELECT ST_AsText(geom) AS geom FROM places\";","handlingStrategy":"validation","validationCode":"// Check column JDBC types are convertible before reading:\nResultSet cols = meta.getColumns(null, schema, table, null);\nwhile (cols.next()) {\n    int jdbcType = cols.getInt(\"DATA_TYPE\");\n    if (jdbcType == Types.OTHER || jdbcType == Types.STRUCT || jdbcType == Types.ARRAY) {\n    LOG.warn(\"Column {} may need a CAST: {}\", cols.getString(\"COLUMN_NAME\"), cols.getString(\"TYPE_NAME\"));\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    CatalogTable table = converter.convert(typeDefinition);\n} catch (SeaTunnelRuntimeException e) {\n    LOG.warn(\"Unsupported Postgres type, cast or exclude the column: {}\", e.getMessage());\n    // fall back to TEXT cast via custom query\n}","preventionTips":["Cast custom/extension types (postgis, custom composites) to text/bytea in queries","Verify with a SELECT * metadata probe before production","Upgrade the connector when using newer Postgres types"],"tags":["jdbc","postgresql","type-conversion"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}