This is an automated email from the ASF dual-hosted git repository.
liaoxin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new e805b6263ab [doc](json load) default behavior change (#2874)
e805b6263ab is described below
commit e805b6263ab7253ca364919712c2b2d4bb5ecd49
Author: Refrain <[email protected]>
AuthorDate: Fri Oct 10 14:59:12 2025 +0800
[doc](json load) default behavior change (#2874)
---
docs/data-operate/import/file-format/json.md | 16 +++++++++-------
.../current/data-operate/import/file-format/json.md | 19 +++++++++++--------
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/docs/data-operate/import/file-format/json.md
b/docs/data-operate/import/file-format/json.md
index 1cb812e3c27..5dc545f65eb 100644
--- a/docs/data-operate/import/file-format/json.md
+++ b/docs/data-operate/import/file-format/json.md
@@ -81,13 +81,13 @@ The following table lists the JSON format parameters
supported by various loadin
| Parameter | Default Value | Stream Load | Broker Load | Routine Load | TVF |
|-----------|--------------|-------------|--------------|--------------|-----|
-| json paths | None | jsonpaths | properties.jsonpaths | properties.jsonpaths
| jsonpaths |
-| json root | None | json_root | properties.json_root | properties.json_root |
json_root |
-| strip outer array | false | strip_outer_array | properties.strip_outer_array
| properties.strip_outer_array | strip_outer_array |
-| read json by line | false | read_json_by_line | Always true | Not supported
| read_json_by_line, default true |
-| fuzzy parse | false | fuzzy_parse | properties.fuzzy_parse | Not supported |
fuzzy_parse |
-| num as string | false | num_as_string | properties.num_as_string |
properties.num_as_string | num_as_string |
-| compression format | plain | compress_type | PROPERTIES.compress_type | Not
supported | compress_type |
+| json paths | None | supported | supported | supported | supported |
+| json root | None | supported | supported | supported | supported |
+| strip outer array | false | supported | supported | supported | supported |
+| read json by line | true | supported | not supported | not supported |
supported |
+| fuzzy parse | false | supported | supported | not supported | supported |
+| num as string | false | supported | supported | supported | supported |
+| compression format | plain | supported | supported | not supported |
supported |
:::tip Note
1. Stream Load: Parameters are specified directly through HTTP Headers, e.g.,
`-H "jsonpaths: $.data"`
@@ -95,6 +95,8 @@ The following table lists the JSON format parameters
supported by various loadin
3. Routine Load: Parameters are specified through `PROPERTIES`, e.g.,
`PROPERTIES("jsonpaths"="$.data")`
4. TVF: Parameters are specified in TVF statements, e.g.,
`S3("jsonpaths"="$.data")`
5. If you need to load the JSON object at the root node of a JSON file, the
jsonpaths should be specified as $., e.g., `PROPERTIES("jsonpaths"="$.")`
+6. The default value of read_json_by_line is true, which means if neither
strip_outer_array nor read_json_by_line is specified during import,
read_json_by_line will be set to true.
+7. "read_json_by_line not configurable" means it is forcibly set to true to
enable streaming reading and reduce BE memory usage.
:::
### Parameter Description
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/file-format/json.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/file-format/json.md
index c141a03f15f..ddaa2af70ea 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/file-format/json.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/file-format/json.md
@@ -47,6 +47,7 @@ Doris 支持以下三种 JSON 格式:
适用于单行数据导入,要求:
- 根节点必须是对象
- 整个对象表示一行数据
+- 文件中一行只有一个json记录
示例数据:
```json
@@ -64,7 +65,7 @@ Doris 支持以下三种 JSON 格式:
适用于批量导入多行数据,要求:
- 每行是一个完整的 JSON 对象
-- 必须设置 `read_json_by_line=true`
+- 可以不设置`read_json_by_line=true`, 默认启用该配置
- 可通过 `line_delimiter` 参数指定行分隔符,默认为 `\n`
示例数据:
@@ -81,13 +82,13 @@ Doris 支持以下三种 JSON 格式:
| 参数 | 默认值 | Stream Load | Broker Load | Routine Load | TVF |
|------|---------|-------------|--------------|--------------|-----|
-| json paths | 无 | jsonpaths | properties.jsonpaths | properties.jsonpaths |
jsonpaths |
-| json root | 无 | json_root | properties.json_root | properties.json_root |
json_root |
-| strip outer array | false | strip_outer_array | properties.strip_outer_array
| properties.strip_outer_array | strip_outer_array |
-| read json by line | false | read_json_by_line | 不支持配置,都为 true | 不支持 |
read_json_by_line, 默认为 true |
-| fuzzy parse | false | fuzzy_parse | properties.fuzzy_parse | 不支持 |
fuzzy_parse |
-| num as string | false | num_as_string | properties.num_as_string |
properties.num_as_string | num_as_string |
-| 压缩格式 | plain | compress_type | PROPERTIES.compress_type | 不支持 |
compress_type |
+| json_paths | 无 | 支持 | 支持 | 支持 | 支持 |
+| json_root | 无 | 支持 | 支持 | 支持 | 支持 |
+|strip_outer_array| false | 支持 | 支持 | 支持 | 支持 |
+|read_json_by_line| true | 支持 | 不支持配置 | 不支持配置 | 支持 |
+| fuzzy_parse | false | 支持 | 支持 | 不支持 | 支持 |
+| num_as_string | false | 支持 | 支持 | 支持 | 支持 |
+| 压缩格式 | plain | 支持 | 支持 | 不支持 | 支持 |
:::tip 注意
1. Stream Load:参数直接通过 HTTP Header 指定,如:`-H "jsonpaths: $.data"`
@@ -95,6 +96,8 @@ Doris 支持以下三种 JSON 格式:
3. Routine Load:参数通过 `PROPERTIES` 指定,如:`PROPERTIES("jsonpaths"="$.data")`
4. TVF:参数通过 TVF 语句指定,如:`S3("jsonpaths"="$.data")`
5. 如果需要将 JSON 文件中根节点的 JSON 对象导入,jsonpaths
需要指定为$.,如:`PROPERTIES("jsonpaths"="$.")`
+6. read_json_by_line默认为true指的是如果导入时不指定strip_outer_array和read_json_by_line任何一个,
那么read_json_by_line为true.
+7. read_json_by_line不支持配置指强制设置为true, 开启流式读取降低BE内存压力
:::
### 参数说明
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]