Description
Differs fromJSONEachRow/JSONStringsEachRow in that ClickHouse streams each event as a separate JSON object and also yields progress information.
The related JSONStringsEachRowWithProgress format uses the same top-level object kinds; field values are serialized as strings.
The compact siblings JSONCompactEachRowWithProgress and JSONCompactStringsEachRowWithProgress share the same stream-object kinds and progress/LIMIT/exception caveats; their row / totals / min / max payloads are value arrays instead of named objects.
Stream objects
Each line of the response is one JSON object. Clients should dispatch on the top-level key:
The
rows_before_limit_at_least object is emitted when the query contains LIMIT, even if the limit did not drop any rows. It is a lower estimate of the number of rows there would have been without LIMIT (same meaning as in JSON); clients must not treat it as proof that rows were dropped.
meta is emitted once before the first row, but a progress object can arrive before meta. The top-level exception object is emitted on the HTTP path only when http_write_exception_in_output_format=1; otherwise the error surfaces through the transport. When emitted it is a separate top-level object, not nested under row.
Example usage
progress object may still be emitted before meta. On the HTTP path with http_write_exception_in_output_format=1, a failed query ends with a separate top-level object (not nested under row):