博客 Engineering

Fixing Pezzo's ClickHouse Timestamp Parse Error With One Insert Setting

英文文章. Pezzo's report inserts failed with CANNOT_PARSE_INPUT_ASSERTION_FAILED on ISO-8601 timestamps. One ClickHouse setting lets them parse.

TypeScriptpezzolabs/pezzoClickHouseLLMOps可观测性

Timestamps in one format, a database expecting another.

简短回答

Pezzo's reporting service inserted ISO-8601 timestamps, with milliseconds and a Z, into ClickHouse DateTime columns. With ClickHouse's basic input format, those values fail to parse, and testing a prompt locally raised CANNOT_PARSE_INPUT_ASSERTION_FAILED. The fix sends the insert with date_time_input_format: "best_effort". It was merged as PR #357 and closed issue #320.

The problem

Issue #320, on Pezzo 0.8.0 with Docker Compose, showed the error when running any prompt test:

ClickHouseError: Cannot parse input: expected '"' before: '.307Z",...': (while reading the value of key timestamp)

The fix

         format: "JSONEachRow",
         table: "reports",
         values: [reportToSave],
+        clickhouse_settings: {
+          date_time_input_format: "best_effort",
+        },

Setting it per insert means the parse works regardless of the server's default.

By the numbers

  • Repository: pezzolabs/pezzo, 3,279 stars (Nov 3, 2026), TypeScript, Apache-2.0
  • Files changed: 1
  • Lines: +3 / -0
  • Commits: 1
  • Opened and merged: Aug 21, 2026. Time to merge: 3 hours, 38 minutes
  • Review: merged by a maintainer

常见问题解答

Where can I read more?

See the pull request and the original issue.

目标

Observability data is only useful if it lands. Telling the database how to read the timestamps it is sent keeps the reports flowing.

运行闭环

把生产信号转化为已审查的修复。

开始免费试用,了解 Prilog 如何把真实事故映射到代码级 Pull Request。