Blog Engineering

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

Articolo in inglese. Pezzo's report inserts failed with CANNOT_PARSE_INPUT_ASSERTION_FAILED on ISO-8601 timestamps. One ClickHouse setting lets them parse.

TypeScriptpezzolabs/pezzoClickHouseLLMOpsosservabilità

Timestamps in one format, a database expecting another.

Risposta breve

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

Domande frequenti

Where can I read more?

See the pull request and the original issue.

L'obiettivo

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

Esegui il ciclo

Trasforma i segnali di produzione in fix revisionati.

Avvia una prova gratuita e scopri come Prilog collega incidenti reali a pull request a livello di codice.