ブログ 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 に結びつける方法をご確認ください。