ソースを参照

docs: add docs for benefit of the defining schema (#1961)

* add docs

Signed-off-by: Song Gao <disxiaofei@163.com>

* address the comment

Signed-off-by: Song Gao <disxiaofei@163.com>

---------

Signed-off-by: Song Gao <disxiaofei@163.com>
Song Gao 1 年間 前
コミット
63cab6ddef

+ 2 - 0
docs/en_US/guide/streams/overview.md

@@ -24,6 +24,8 @@ The stream definition is a SQL statement. It is composed by two parts:
 
 
 Schema definition is optional. It is only needed when the ingested data is fixed type and need a strong validation.
 Schema definition is optional. It is only needed when the ingested data is fixed type and need a strong validation.
 
 
+When the format of the data source is json, defining the schema information of the stream will help only the data in the schema definition be parsed when parsing json data. When the structure of the data from the source is relatively complex or large and the information required in the schema definition is clear and simple, parsing only the json data required will greatly reduce the processing time during paring, thereby improving performance.
+
 In eKuiper, each column or an expression has a related data type. A data type describes (and constrains) the set of values that a column of that type can hold or an expression of that type can produce.
 In eKuiper, each column or an expression has a related data type. A data type describes (and constrains) the set of values that a column of that type can hold or an expression of that type can produce.
 
 
 Below is the list of data types supported.
 Below is the list of data types supported.

+ 2 - 0
docs/zh_CN/guide/streams/overview.md

@@ -26,6 +26,8 @@ CREATE STREAM
 
 
 在 eKuiper 中,每个列或表达式都有一个相关的数据类型。 数据类型描述(约束)该类型的列可以容纳的一组值或该类型可以产生的表达式。
 在 eKuiper 中,每个列或表达式都有一个相关的数据类型。 数据类型描述(约束)该类型的列可以容纳的一组值或该类型可以产生的表达式。
 
 
+同时,当数据源的格式为 json 时,定义流的模式信息将有助于在解析 json 数据时仅将模式定义中的数据被解析出来。当数据源中单条信息的结构较为复杂或者较大且模式定义中所需要的信息明确并简单时,解析仅需的 json 数据将极大的降低单条数据的处理时间,从而提升性能。
+
 以下是支持的数据类型的列表。
 以下是支持的数据类型的列表。
 
 
 | #   | 数据类型     | 说明                                                             |
 | #   | 数据类型     | 说明                                                             |