{"record":{"id":"e39ed4ee451f0d80","repo":"apache/seatunnel","slug":"common-17-e39ed4","errorCode":"COMMON-17","errorMessage":"'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type.","messagePattern":"'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type\\.","errorType":"error_code","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-amazondocumentdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazondocumentdb/serialize/DocumentDBItemDeserializer.java","lineNumber":117,"sourceCode":"                    return convertDecimal((DecimalType) type, value);\n                case STRING:\n                    return convertString(value);\n                case DATE:\n                    return convertDateTime(value).toLocalDate();\n                case TIME:\n                    return convertDateTime(value).toLocalTime();\n                case TIMESTAMP:\n                    return convertDateTime(value);\n                case BYTES:\n                    return value.asBinary().getData();\n                case ARRAY:\n                    return convertArray(field, (ArrayType<?, ?>) type, value);\n                case MAP:\n                    return convertMap(field, (MapType<?, ?>) type, value);\n                case ROW:\n                    return convertRow(field, (SeaTunnelRowType) type, value.asDocument());\n                default:\n                    throw conversionError(field, type);\n            }\n        } catch (SeaTunnelRuntimeException e) {\n            throw e;\n        } catch (RuntimeException e) {\n            SeaTunnelRuntimeException error = conversionError(field, type);\n            error.initCause(e);\n            throw error;\n        }\n    }\n\n    private static boolean isNull(BsonValue value) {\n        return value == null\n                || value.isNull()\n                || value.getBsonType() == BsonType.UNDEFINED\n                || (value.isDecimal128() && value.asDecimal128().getValue().isNaN());\n    }\n\n    private static int checkedInteger(BsonValue value, int minimum, int maximum) {","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-amazondocumentdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazondocumentdb/serialize/DocumentDBItemDeserializer.java#L99-L135","documentation":"DocumentDBItemDeserializer.convert translates a BSON value into a SeaTunnel data value according to the target SeaTunnelType. When the target type is not one of the supported kinds (or conversion otherwise fails), it throws a SeaTunnelRuntimeException with error code COMMON-17 stating the field and data type are unsupported.","triggerScenarios":"A DocumentDB document field maps to a SeaTunnel type whose SqlType falls into the switch's default branch (e.g., an unsupported type like ARRAY with unexpected inner type, ROW conversions of non-document values), or the raw conversion throws a RuntimeException that is re-wrapped as conversionError.","commonSituations":"Schema inferred from the collection contains a BSON type not handled by the deserializer; source collection has mixed-type fields where a row field contains a non-document BSON value; map declared with non-string key.","solutions":["Check the declared SeaTunnel schema for the offending field ('<field>'/'<dataType>' in the message) and change it to a supported type (STRING, INT, BIGINT, DOUBLE, BOOLEAN, ARRAY, MAP with string keys, ROW for documents)","Use Transform-SQL/field filtering upstream to drop or cast unsupported fields before the sink/source mapping","Upgrade SeaTunnel — newer releases extend the supported BSON conversions","Wrap the identifier from the exception message and inspect the actual BSON type in the collection to confirm the mismatch"],"exampleFix":"// before: schema declares BYTES for a BSON Binary field\nSeaTunnelRowType.of(new String[]{\"data\"}, new SeaTunnelType[]{BytesType.class})\n// after: use a supported mapping\nSeaTunnelRowType.of(new String[]{\"data\"}, new SeaTunnelType[]{StringType.class}) // decode Binary as base64/string","handlingStrategy":"validation","validationCode":"// before reading, check the schema maps only supported SqlTypes\nfor (SeaTunnelType<?> t : rowType.getFieldTypes()) {\n  switch (t.getSqlType()) { case STRING: case INT: case BIGINT: case DOUBLE: case BOOLEAN: case ARRAY: case MAP: case ROW: continue; default: throw new IllegalArgumentException(\"unsupported: \" + t); }\n}","typeGuard":null,"tryCatchPattern":"try { deserialize(item); } catch (SeaTunnelRuntimeException e) { if (e.getMessage().contains(\"COMMON-17\")) { log.error(\"unsupported field type: {}\", e.getMessage()); } throw e; }","preventionTips":["Match schema types to BSON types (string map keys, ROW for documents)","Cast/drop unsupported fields with a Transform before mapping","Pin the collection schema to known-supported types","Upgrade SeaTunnel for extended BSON coverage"],"tags":["amazondocumentdb","bson","serialization","type-conversion"],"backgroundTag":"unsupported-operation","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"}