{"record":{"id":"9ff6774e620a39d3","repo":"apache/seatunnel","slug":"common-32-9ff677","errorCode":"COMMON-32","errorMessage":"The date format '<date>' of field '<field>' is not supported. Please check the date format.","messagePattern":"The date format '<date>' of field '<field>' is not supported\\. Please check the date format\\.","errorType":"error_code","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-formats/seatunnel-format-text/src/main/java/org/apache/seatunnel/format/text/TextDeserializationSchema.java","lineNumber":317,"sourceCode":"                return Long.parseLong(field);\n            case FLOAT:\n                return Float.parseFloat(field);\n            case DOUBLE:\n                return Double.parseDouble(field);\n            case DECIMAL:\n                return new BigDecimal(field);\n            case NULL:\n                return null;\n            case BYTES:\n                return field.getBytes(StandardCharsets.UTF_8);\n            case DATE:\n                DateTimeFormatter dateFormatter = fieldFormatterMap.get(fieldName);\n                if (dateFormatter == null) {\n                    dateFormatter = DateUtils.matchDateFormatter(field);\n                    fieldFormatterMap.put(fieldName, dateFormatter);\n                }\n                if (dateFormatter == null) {\n                    throw CommonError.formatDateError(field, fieldName);\n                }\n\n                return dateFormatter.parse(field).query(TemporalQueries.localDate());\n            case TIME:\n                TemporalAccessor parsedTime = TIME_FORMAT.parse(field);\n                return parsedTime.query(TemporalQueries.localTime());\n            case TIMESTAMP:\n                DateTimeFormatter dateTimeFormatter = fieldFormatterMap.get(fieldName);\n                if (dateTimeFormatter == null) {\n                    dateTimeFormatter = DateTimeUtils.matchDateTimeFormatter(field);\n                    fieldFormatterMap.put(fieldName, dateTimeFormatter);\n                }\n                if (dateTimeFormatter == null) {\n                    throw CommonError.formatDateTimeError(field, fieldName);\n                }\n\n                TemporalAccessor parsedTimestamp = dateTimeFormatter.parse(field);\n                LocalTime localTime = parsedTimestamp.query(TemporalQueries.localTime());","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-formats/seatunnel-format-text/src/main/java/org/apache/seatunnel/format/text/TextDeserializationSchema.java#L299-L335","documentation":"TextDeserializationSchema.convert() throws this when a field declared as DATE in the row type cannot be matched to any known date pattern by DateUtils.matchDateFormatter(field). CommonError.formatDateError signals the raw text value is not a recognizable date string.","triggerScenarios":"Deserializing a text (CSV/txt) column mapped to SeaTunnel DATE type where the string does not match any supported date pattern (e.g. '2024/13/01', '01-02-2024' if not in pattern list, or an empty/garbage value). The formatter cache is populated per field name; if the first lookup fails, every row fails.","commonSituations":"CSV export using a locale-specific date format (dd.MM.yyyy); spreadsheet-exported dates like 'Jan 5, 2024'; accidentally mapping a string column to DATE; leading/trailing whitespace in the field.","solutions":["Inspect the offending value printed in the error message and compare against supported patterns in DateUtils.matchDateFormatter.","Fix the source data to a supported date format (e.g. yyyy-MM-dd).","Change the column type in the catalog to STRING and convert manually after read.","Pre-clean the text file (normalize date separators, strip whitespace).","If a new format is genuinely needed, extend DateUtils with the pattern or configure a custom date format option."],"exampleFix":"// before (data)\n2024/05/06\n// after\n2024-05-06","handlingStrategy":"validation","validationCode":"boolean isSupportedDate(String v) {\n    return v != null && v.matches(\"\\\\d{4}-\\\\d{2}-\\\\d{2}\");\n}\n// pre-check each DATE column value against this before ingestion","typeGuard":null,"tryCatchPattern":"try {\n    LocalDate d = (LocalDate) schema.deserialize(bytes);\n} catch (Exception e) {\n    log.error(\"Date field unparsable: {}\", e.getMessage());\n    // dead-letter the record or default the date\n}","preventionTips":["Emit dates from the source in yyyy-MM-dd","Trim whitespace from CSV fields before deserialization","Map uncertain columns to STRING and parse explicitly","Verify all date formats in the file during a sample dry-run before the full job"],"tags":["date","text-format","deserialization","csv"],"backgroundTag":"invalid-date-format","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"}