{"record":{"id":"6df4c1582bed4b19","repo":"apache/seatunnel","slug":"unsupported-data-type-6df4c1","errorCode":"UNSUPPORTED_DATA_TYPE","errorMessage":"SeaTunnel file connector is not supported for this data type [%s]","messagePattern":"SeaTunnel file connector is not supported for this data type \\[(.+?)\\]","errorType":"error_code","errorClass":"FileConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/writer/ParquetWriteStrategy.java","lineNumber":322,"sourceCode":"                                .collect(Collectors.toList());\n                Schema recordSchema =\n                        buildAvroSchemaWithRowType(\n                                (SeaTunnelRowType) seaTunnelDataType, sinkColumnsIndex);\n                GenericRecordBuilder recordBuilder = new GenericRecordBuilder(recordSchema);\n                for (int i = 0; i < fieldNames.length; i++) {\n                    String parquetFieldName = normalizeFieldName(fieldNames[i]);\n                    recordBuilder.set(\n                            parquetFieldName,\n                            resolveObject(\n                                    parquetFieldName, seaTunnelRow.getField(i), fieldTypes[i]));\n                }\n                return recordBuilder.build();\n            default:\n                String errorMsg =\n                        String.format(\n                                \"SeaTunnel file connector is not supported for this data type [%s]\",\n                                seaTunnelDataType.getSqlType());\n                throw new FileConnectorException(\n                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE, errorMsg);\n        }\n    }\n\n    private static String normalizeFieldName(String fieldName) {\n        return fieldName.toLowerCase(Locale.ROOT);\n    }\n\n    public Type seaTunnelDataType2ParquetDataType(\n            String fieldName, SeaTunnelDataType<?> seaTunnelDataType) {\n        switch (seaTunnelDataType.getSqlType()) {\n            case ARRAY:\n                SeaTunnelDataType<?> elementType =\n                        ((ArrayType<?, ?>) seaTunnelDataType).getElementType();\n                return Types.optionalGroup()\n                        .as(OriginalType.LIST)\n                        .addField(\n                                Types.repeatedGroup()","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/writer/ParquetWriteStrategy.java#L304-L340","documentation":"ParquetWriteStrategy.resolveObject converts each SeaTunnel row field into a Parquet record value via a switch on the field's SqlType. When the SqlType has no mapping (falls into default, including SQL type NULL), it throws FileConnectorException with UNSUPPORTED_DATA_TYPE naming the SqlType. It means the Parquet writer cannot represent that SeaTunnel type in the record it builds.","triggerScenarios":"Writing rows to a Parquet sink whose SeaTunnelRow contains a field with an unsupported SqlType (e.g. SeaTunnelDataType NULL or a newly added type not covered by the switch); recursion via resolveObject/resolvedObject for nested structures.","commonSituations":"Using exotic column types (arrays/maps/rows of unsupported element types) with parquet file format; a source emitting NULL-typed columns; upgrading SeaTunnel adds a new SqlType while the connector switch wasn't extended; type coercion mistakes leaving a raw type in the row schema.","solutions":["Check the error message for the unsupported SqlType and change the schema to a supported type (string/int/long/double/decimal/timestamp, etc.)","Cast unsupported columns in a SQL transform before the sink (e.g. CAST(col AS STRING))","Remove NULL-typed placeholder columns from the schema","If a genuinely supported type is missing, extend seaTunnelDataType2ParquetDataType/resolveObject in the connector and contribute a PR"],"exampleFix":"-- before: sink receives MAP/NULL type column\n-- after\ntransform Sql {\n  source_table = \"src\"\n  result_table_name = \"casted\"\n  query = \"SELECT CAST(unsupported_col AS STRING) AS unsupported_col, * FROM src\"\n}","handlingStrategy":"validation","validationCode":"Set<SqlType> supported = Set.of(STRING,INT,BIGINT,DOUBLE,FLOAT,DECIMAL,BOOLEAN,TIMESTAMP,DATE,MAP,ARRAY,ROW); schemaFields.forEach(f -> { if (!supported.contains(f.sqlType)) throw new ConfigException(\"unsupported: \" + f.sqlType); });","typeGuard":null,"tryCatchPattern":"try { sinkWriter.write(row); } catch (FileConnectorException e) { if (e.getMessage().contains(\"not supported for this data type\")) { /* CAST column upstream */ } }","preventionTips":["Validate the sink schema against supported Parquet SqlTypes at config time","CAST or drop unsupported columns in a SQL transform before the sink","Keep engine and connector versions aligned to avoid unhandled new SqlTypes"],"tags":["parquet","unsupported-type","file-sink","schema"],"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"}