apache/seatunnel · error · SeaTunnelRuntimeException
COMMON-32
COMMON-32
Error message
The date format '<date>' of field '<field>' is not supported. Please check the date format.
What it means
A JSON string value for a DATE field could not be matched to any known date pattern, so JsonToRowConverters.convertToLocalDate throws COMMON-32. The converter tries the field's cached formatter, then attempts to auto-match a formatter via DateTimeUtils.matchDateTimeFormatter; if none matches, format_date_error is raised naming the value and field.
Solutions
- Fix the source to emit ISO-8601 dates (yyyy-MM-dd)
- Apply a string transform to normalize the date text to a supported pattern before JSON parsing
- Check the format's date formatter configuration option and set the matching pattern
- Inspect the error's date and field values to confirm which field and format is failing
Example fix
// before
{"birthday": "05/01/1990"} // unmatched pattern
// after
{"birthday": "1990-01-05"} // ISO yyyy-MM-dd Defensive patterns
Strategy: validation
Validate before calling
// validate the DATE string parses as ISO before ingestion java.time.LocalDate.parse(dateStr); // throws DateTimeParseException if not yyyy-MM-dd
Type guard
static boolean isIsoDate(String s) {
try { java.time.LocalDate.parse(s); return true; } catch (Exception e) { return false; }
} Try / catch
try {
row = jsonDeserializer.deserialize(bytes);
} catch (SeaTunnelRuntimeException e) {
if (String.valueOf(e.getMessage()).contains("date format")) {
log.warn("Bad DATE value dropped: {}", e.getMessage());
return null;
}
throw e;
} Prevention
- Standardize producers on ISO-8601 yyyy-MM-dd
- Normalize date strings with a transform before JSON parsing
- Configure the format's date formatter option for known non-ISO producers
- Add sample-payload tests covering every DATE field
When it happens
Trigger: Parsing a JSON field declared as SeaTunnel DATE whose string (e.g. "2024/01/05", "05-01-2024", "Jan 5, 2024") matches no supported formatter and no user-configured date formatter applies.
Common situations: Upstream sends dates in a non-ISO format (slash-separated, locale month names, two-digit years); schema evolved to add DATE fields with unexpected formats; user assumed a custom pattern would be honored without configuring it.
Related errors
- COMMON-32
- COMMON-33
- ILLEGAL_ARGUMENT
- UNSUPPORTED_DATA_TYPE
- A decoding format must override this method to apply…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/3a874fe8395c5fbf.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/JsonToRowConverters.java:285
private LocalDate convertToLocalDate(JsonNode jsonNode, String fieldName) {
String dateStr = jsonNode.asText();
DateTimeFormatter dateFormatter = null;
if (fieldName != null) {
dateFormatter = fieldFormatterMap.get(fieldName);
}
if (dateFormatter == null) {
dateFormatter = DateUtils.matchDateFormatter(dateStr);
if (fieldName != null) {
fieldFormatterMap.put(fieldName, dateFormatter);
}
}
if (dateFormatter == null) {
throw CommonError.formatDateError(dateStr, fieldName);
}
return dateFormatter.parse(dateStr).query(TemporalQueries.localDate());
}
private LocalTime convertToLocalTime(JsonNode jsonNode) {
TemporalAccessor parsedTime = TIME_FORMAT.parse(jsonNode.asText());
return parsedTime.query(TemporalQueries.localTime());
}
private LocalDateTime convertToLocalDateTime(JsonNode jsonNode, String fieldName) {
String datetimeStr = jsonNode.asText();
DateTimeFormatter dateTimeFormatter = null;
if (fieldName != null) {
dateTimeFormatter = fieldFormatterMap.get(fieldName);
}View on GitHub (pinned to cf67b549a7)