{"record":{"id":"acf31ff4714afac8","repo":"apache/druid","slug":"timestamp-s-is-unparseable-event-s","errorCode":null,"errorMessage":"Timestamp[%s] is unparseable! Event: %s","messagePattern":"Timestamp\\[(.+?)\\] is unparseable! Event: (.+?)","errorType":"exception","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/data/input/impl/MapInputRowParser.java","lineNumber":154,"sourceCode":"   *\n   * @param timeValue      object to interpret as timestmap\n   * @param timestampSpec  timestamp spec\n   * @param rawMapSupplier supplier of the original raw data that this object came from. Used for error messages.\n   */\n  public static DateTime parseTimestampOrThrowParseException(\n      final Object timeValue,\n      final TimestampSpec timestampSpec,\n      final Supplier<Map<String, ?>> rawMapSupplier\n  )\n  {\n    final DateTime timestamp;\n\n    try {\n      timestamp = timestampSpec.parseDateTime(timeValue);\n    }\n    catch (Exception e) {\n      String rawMap = rawMapToPrint(rawMapSupplier.get());\n      throw new ParseException(\n          rawMap,\n          e,\n          \"Timestamp[%s] is unparseable! Event: %s\",\n          timeValue,\n          rawMap\n      );\n    }\n    if (timestamp == null) {\n      String rawMap = rawMapToPrint(rawMapSupplier.get());\n      throw new ParseException(\n          rawMap,\n          \"Timestamp[%s] is unparseable! Event: %s\",\n          timeValue,\n          rawMap\n      );\n    }\n    if (!Intervals.ETERNITY.contains(timestamp)) {\n      String rawMap = rawMapToPrint(rawMapSupplier.get());","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/data/input/impl/MapInputRowParser.java#L136-L172","documentation":"MapInputRowParser.parseTimestampOrThrowParseException throws this ParseException when the TimestampSpec cannot parse the row's timestamp value. The timestamp string did not match any configured format or parse function, so the row cannot be assigned a primary timestamp.","triggerScenarios":"A row whose timestamp field value cannot be interpreted by the configured timestampSpec (wrong format, missing column, null value) - specifically when TimestampSpec.parseDateTime throws.","commonSituations":"Timestamps in a different format than spec.format/pattern expects, ISO strings fed to a 'millis' format, timestamps in a column other than the configured column, locale/timezone mismatches.","solutions":["Fix the timestampSpec format/pattern to match the actual data","Verify the timestamp column name points to the right field","Pre-normalize timestamps in the parse spec (e.g. with a transform)","Check the row content in the exception message for the actual timestamp representation"],"exampleFix":"// before\n\"timestampSpec\": {\"column\": \"ts\", \"format\": \"iso\"}  // data: 01/02/2024 10:00:00\n// after\n\"timestampSpec\": {\"column\": \"ts\", \"format\": \"MM/dd/yyyy HH:mm:ss\"}","handlingStrategy":"validation","validationCode":"// sample-check timestamp parse before ingestion\ntry { new TimestampSpec(\"ts\", \"iso\", null).parseDateTime(row.get(\"ts\")); } catch (Exception e) { /* bad format */ }","typeGuard":"boolean isParseable(Object v, TimestampSpec ts) { try { ts.parseDateTime(v); return true; } catch (Exception e) { return false; } }","tryCatchPattern":"try { parser.parseBatch(rows); } catch (ParseException e) { log.error(\"Bad timestamp in row: {}\", e.getMessage()); sendToDeadLetter(e); }","preventionTips":["Match timestampSpec format/pattern to real data samples","Verify the timestamp column name exists in the schema","Pre-normalize timestamps upstream or with transforms"],"tags":["timestamp","parse","ingestion"],"backgroundTag":"invalid-date-format","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}