{"record":{"id":"0a058ec30d79bcdb","repo":"apache/seatunnel","slug":"common-19-0a058e","errorCode":"COMMON-19","errorMessage":"'${identifier}' unsupported convert SeaTunnel data type '${dataType}' of '${field}' to connector data type.","messagePattern":"'(.+?)' unsupported convert SeaTunnel data type '(.+?)' of '(.+?)' to connector 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":513,"sourceCode":"                        break;\n                    case FLOAT:\n                        builder.columnType(PG_REAL_ARRAY);\n                        builder.dataType(PG_REAL_ARRAY);\n                        break;\n                    case DOUBLE:\n                        builder.columnType(PG_DOUBLE_PRECISION_ARRAY);\n                        builder.dataType(PG_DOUBLE_PRECISION_ARRAY);\n                        break;\n                    case BYTES:\n                        builder.columnType(PG_BYTEA);\n                        builder.dataType(PG_BYTEA);\n                        break;\n                    case STRING:\n                        builder.columnType(PG_TEXT_ARRAY);\n                        builder.dataType(PG_TEXT_ARRAY);\n                        break;\n                    default:\n                        throw CommonError.convertToConnectorTypeError(\n                                DatabaseIdentifier.POSTGRESQL,\n                                elementType.getSqlType().name(),\n                                column.getName());\n                }\n                break;\n            default:\n                throw CommonError.convertToConnectorTypeError(\n                        DatabaseIdentifier.POSTGRESQL,\n                        column.getDataType().getSqlType().name(),\n                        column.getName());\n        }\n\n        return builder.build();\n    }\n}\n","sourceCodeStart":495,"sourceCodeEnd":529,"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#L495-L529","documentation":"PostgresTypeConverter.reconvert() throws this when reverse-mapping a SeaTunnel ARRAY column to a Postgres array type and the array's ELEMENT type is unsupported (inner default). CommonError.convertToConnectorTypeError is raised with DatabaseIdentifier.POSTGRESQL and the element SQL type name.","triggerScenarios":"Auto-creating a Postgres table for a sink where a SeaTunnel ARRAY column has an element type not mapped to a PG array element (e.g. ARRAY<MAP>, ARRAY<ROW>, ARRAY<NULL>) — inner default in reconvert.","commonSituations":"Sinking JSON/complex sources into Postgres with auto-create-table enabled; PG arrays exist only for primitive element types, so nested/complex elements fail reconvert.","solutions":["Pre-create the PG table with a matching text[]/jsonb column and disable auto-create-table","Cast the array element to a supported type (e.g. ARRAY<STRING>) via a transform","Extend the inner switch in PostgresTypeConverter.reconvert"],"exampleFix":"// before: ARRAY<MAP> auto-create fails\n// after: transform MAP column to JSON string first\n// transform { Json {} } then sink ARRAY<STRING>/STRING column","handlingStrategy":"validation","validationCode":"// Verify PG array element types before auto-create:\nfor (CatalogColumn col : schema.getColumns()) {\n    if (col.getDataType() instanceof ArrayType) {\n    SqlType el = ((ArrayType) col.getDataType()).getElementType().getSqlType();\n    if (!(el == SqlType.STRING || el == SqlType.INT || el == SqlType.BIGINT || el == SqlType.DOUBLE || el == SqlType.BOOLEAN)) {\n        throw new IllegalStateException(\"Unsupported PG array element: \" + el);\n    }\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    PhysicalColumn col = converter.reconvert(column);\n} catch (SeaTunnelRuntimeException e) {\n    LOG.warn(\"Cannot map PG array element: {}\", e.getMessage());\n    // fallback: map element to STRING (text[])\n}","preventionTips":["Use only primitive-element arrays for PG auto-create","Pre-create jsonb/text[] columns for complex arrays","Validate schemas with a local conversion test first"],"tags":["jdbc","postgresql","type-conversion","auto-create"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}