mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2026-10-28 16:18:23 +08:00
30 lines
1.6 KiB
Plaintext
30 lines
1.6 KiB
Plaintext
---
|
|
description: 'Documentation for the JSONStringsEachRowWithProgress format'
|
|
keywords: ['JSONStringsEachRowWithProgress']
|
|
slug: /interfaces/formats/JSONStringsEachRowWithProgress
|
|
title: 'JSONStringsEachRowWithProgress'
|
|
doc_type: 'reference'
|
|
---
|
|
|
|
{/*AUTOGENERATED_START*/}
|
|
## Description {#description}
|
|
|
|
Differs from `JSONEachRow`/`JSONStringsEachRow` in that ClickHouse streams each event as a separate JSON object and also yields progress information.
|
|
|
|
All field values are serialized as strings (including complex types): for example `arr` is emitted as `"arr":"[0,1]"`, not as a nested JSON array. Scalars are likewise stringified (`"num":"42"`).
|
|
|
|
The top-level object kinds match [`JSONEachRowWithProgress`](/reference/formats/JSON/JSONEachRowWithProgress) (`meta`, `row`, `progress`, `totals`/`min`/`max`, `rows_before_limit_at_least`, `rows_before_aggregation`, and top-level `exception`). Follow that page for the full stream contract: a `progress` object may arrive before `meta`; `rows_before_limit_at_least` is a lower estimate when the query contains `LIMIT` (not proof rows were dropped); `exception` is only written on the HTTP path with `http_write_exception_in_output_format=1`.
|
|
|
|
## Example usage {#example-usage}
|
|
|
|
```json
|
|
{"meta":[{"name":"num","type":"UInt8"},{"name":"str","type":"String"},{"name":"arr","type":"Array(UInt8)"}]}
|
|
{"row":{"num":"42","str":"hello","arr":"[0,1]"}}
|
|
{"row":{"num":"43","str":"hello","arr":"[0,1,2]"}}
|
|
{"row":{"num":"44","str":"hello","arr":"[0,1,2,3]"}}
|
|
{"progress":{"read_rows":"3","read_bytes":"24","written_rows":"0","written_bytes":"0","total_rows_to_read":"3"}}
|
|
```
|
|
|
|
## Format settings {#format-settings}
|
|
{/*AUTOGENERATED_END*/}
|