浏览代码

feat(doc):Document specification (#672)

Co-authored-by: EMqmyd <mayuedong@emx.io>
EMQmyd 4 年之前
父节点
当前提交
bdd1708227

+ 9 - 9
docs/en_US/json_expr.md

@@ -1,4 +1,4 @@
-# Sample data
+## Sample data
 
 
 ```json
 ```json
 {
 {
@@ -29,9 +29,9 @@
 }
 }
 ```
 ```
 
 
-# Basic expressions
+## Basic expressions
 
 
-## Identifier 
+### Identifier 
 
 
 Source Dereference (`.`) The source dereference operator can be used to specify columns by dereferencing the source stream or table. The ``->`` dereference selects a key in a nested JSON object.
 Source Dereference (`.`) The source dereference operator can be used to specify columns by dereferencing the source stream or table. The ``->`` dereference selects a key in a nested JSON object.
 
 
@@ -54,7 +54,7 @@ SELECT name->first AS fname FROM demo
 {"fname": "Tom"}
 {"fname": "Tom"}
 ```
 ```
 
 
-## Index expression
+### Index expression
 
 
 Index Expressions allow you to select a specific element in a list. It should look similar to array access in common programming languages. Indexing is 0 based.
 Index Expressions allow you to select a specific element in a list. It should look similar to array access in common programming languages. Indexing is 0 based.
 
 
@@ -79,7 +79,7 @@ SELECT d.friends[0]->last FROM demo AS d
 }
 }
 ```
 ```
 
 
-# Slicing
+## Slicing
 
 
 Slices allow you to select a contiguous subset of an array. 
 Slices allow you to select a contiguous subset of an array. 
 
 
@@ -120,7 +120,7 @@ SELECT followers->Group1[:1]->first FROM demo
 }
 }
 ```
 ```
 
 
-# Json Path functions
+## Json Path functions
 
 
 Kuiper provides a list of functions to allow to execute json path over struct or array columns or values. The functions are:
 Kuiper provides a list of functions to allow to execute json path over struct or array columns or values. The functions are:
 
 
@@ -179,11 +179,11 @@ SELECT json_path_exists(followers, "$[\"my.follower\"]") FROM demo
 ["Miller"]
 ["Miller"]
 ```
 ```
 
 
-# *Projections*
+## *Projections*
 
 
 <!--Do we need to support this?-->
 <!--Do we need to support this?-->
 
 
-## List & Slice projections
+### List & Slice projections
 
 
 A wildcard expression creates a list projection, which is a projection over a JSON array. 
 A wildcard expression creates a list projection, which is a projection over a JSON array. 
 
 
@@ -203,7 +203,7 @@ SELECT friends[:1]->first FROM demo
 }
 }
 ```
 ```
 
 
-## Object projections
+### Object projections
 
 
 
 
 
 

+ 8 - 8
docs/en_US/operation/install/overview.md

@@ -1,11 +1,11 @@
-# Installation instruction
+## Installation instruction
 
 
 Please download the installation package, and refer to below for the instruction of installing for different operate systems.
 Please download the installation package, and refer to below for the instruction of installing for different operate systems.
 
 
 - [Cent-OS](cent-os.md)
 - [Cent-OS](cent-os.md)
 - ...
 - ...
 
 
-# Installation structure 
+## Installation structure 
 
 
 Below is the directory structure after installation. 
 Below is the directory structure after installation. 
 
 
@@ -20,27 +20,27 @@ plugins
 log
 log
 ```
 ```
 
 
-## bin
+### bin
 
 
 The ``bin`` directory includes all of executable files. Such as ``kuiper`` command.
 The ``bin`` directory includes all of executable files. Such as ``kuiper`` command.
 
 
-## etc
+### etc
 
 
 The ``etc`` directory contains the configuration files of Kuiper. Such as MQTT source configurations etc.
 The ``etc`` directory contains the configuration files of Kuiper. Such as MQTT source configurations etc.
 
 
-## data
+### data
 
 
 Kuiper persistences all the definitions of streams and rules, and all of message will be stored in this folder  for long duration operations.
 Kuiper persistences all the definitions of streams and rules, and all of message will be stored in this folder  for long duration operations.
 
 
-## plugins
+### plugins
 
 
 Kuiper allows users to develop your own plugins, and put these plugins into this folder.  See [extension](../../extension/overview.md) for more info for how to extend the Kuiper.
 Kuiper allows users to develop your own plugins, and put these plugins into this folder.  See [extension](../../extension/overview.md) for more info for how to extend the Kuiper.
 
 
-## log
+### log
 
 
 All of the log files are under this folder. The default log file name is ``stream.log``.
 All of the log files are under this folder. The default log file name is ``stream.log``.
 
 
-# Next steps
+## Next steps
 
 
 - See [getting started](../../getting_started.md) for your first Kuiper experience.
 - See [getting started](../../getting_started.md) for your first Kuiper experience.
 - See [CLI tools](../../cli/overview.md) for usage of Kuiper CLI tools.
 - See [CLI tools](../../cli/overview.md) for usage of Kuiper CLI tools.

+ 1 - 1
docs/en_US/plugins/functions/functions.md

@@ -16,7 +16,7 @@ echo(avg) 示例
   SELECT echo(avg) as r1 FROM test;
   SELECT echo(avg) as r1 FROM test;
   ```
   ```
 
 
-###  countPlusOne 插件
+### countPlusOne 插件
 
 
 | 函数         | 示例              | 说明                 |
 | 函数         | 示例              | 说明                 |
 | ------------ | ----------------- | -------------------- |
 | ------------ | ----------------- | -------------------- |

+ 6 - 6
docs/en_US/plugins/overview.md

@@ -31,17 +31,17 @@ This part of the content defines which library dependencies are used by the plug
 
 
   This part contains the author information of the plugin. The plugin developer can provide this information as appropriate. The information of this part will be displayed in the plugin information list of the management console.
   This part contains the author information of the plugin. The plugin developer can provide this information as appropriate. The information of this part will be displayed in the plugin information list of the management console.
 
 
-      * name
-      * email
-      * company
-      * website
+  * name
+  * email
+  * company
+  * website
 
 
 * helpUrl
 * helpUrl
 
 
   The help file address of the plug-in. The console will link to the corresponding help file according to the language support.
   The help file address of the plug-in. The console will link to the corresponding help file according to the language support.
 
 
-      * en_US: English document help address
-      * zh_CN: Chinese document help address
+  * en_US: English document help address
+  * zh_CN: Chinese document help address
 
 
 * description
 * description
 
 

+ 2 - 2
docs/en_US/plugins/sinks/influx.md

@@ -36,7 +36,7 @@ Restart the Kuiper server to activate the plugin.
 
 
 Below is a sample for selecting temperature great than 50 degree, and some profiles only for your reference.
 Below is a sample for selecting temperature great than 50 degree, and some profiles only for your reference.
 
 
-####/tmp/influxRule.txt
+#### /tmp/influxRule.txt
 ```json
 ```json
 {
 {
   "id": "influx",
   "id": "influx",
@@ -58,7 +58,7 @@ Below is a sample for selecting temperature great than 50 degree, and some profi
   ]
   ]
 }
 }
 ```
 ```
-####/tmp/influxPlugin.txt
+#### /tmp/influxPlugin.txt
 ```json
 ```json
 {
 {
    "file":"http://localhost:8080/influx.zip"
    "file":"http://localhost:8080/influx.zip"

+ 18 - 18
docs/en_US/rules/sources/edgex.md

@@ -1,8 +1,8 @@
-# EdgeX Source
+## EdgeX Source
 
 
 Kuiper provides built-in support for EdgeX source stream, which can subscribe the message from [EdgeX message bus](https://github.com/edgexfoundry/go-mod-messaging) and feed into the Kuiper streaming process pipeline.  
 Kuiper provides built-in support for EdgeX source stream, which can subscribe the message from [EdgeX message bus](https://github.com/edgexfoundry/go-mod-messaging) and feed into the Kuiper streaming process pipeline.  
 
 
-## Stream definition for EdgeX
+### Stream definition for EdgeX
 
 
 EdgeX already defines data types in [value descriptors](https://github.com/edgexfoundry/go-mod-core-contracts), so it's recommeded to use schema-less stream definition in EdgeX source as in below.
 EdgeX already defines data types in [value descriptors](https://github.com/edgexfoundry/go-mod-core-contracts), so it's recommeded to use schema-less stream definition in EdgeX source as in below.
 
 
@@ -19,7 +19,7 @@ EdgeX source will try to get the data type of a field,
 
 
 The types defined in EdgeX value descriptors will be converted into related [data types](../../sqls/streams.md) that supported in Kuiper.
 The types defined in EdgeX value descriptors will be converted into related [data types](../../sqls/streams.md) that supported in Kuiper.
 
 
-### Boolean
+#### Boolean
 
 
 If  ``Type`` value of ``ValueDescriptor`` is ``Bool``, then Kuiper tries to convert to ``boolean`` type. Following values will be converted into ``true``.
 If  ``Type`` value of ``ValueDescriptor`` is ``Bool``, then Kuiper tries to convert to ``boolean`` type. Following values will be converted into ``true``.
 
 
@@ -29,31 +29,31 @@ Following will be converted into ``false``.
 
 
 - "0", "f", "F", "false", "FALSE", "False"
 - "0", "f", "F", "false", "FALSE", "False"
 
 
-### Bigint
+#### Bigint
 
 
 If  ``Type`` value of ``ValueDescriptor`` is ``INT8`` , ``INT16``, ``INT32``,  ``INT64``,``UINT`` , ``UINT8`` , ``UINT16`` ,  ``UINT32`` , ``UINT64`` then Kuiper tries to convert to ``Bigint`` type. 
 If  ``Type`` value of ``ValueDescriptor`` is ``INT8`` , ``INT16``, ``INT32``,  ``INT64``,``UINT`` , ``UINT8`` , ``UINT16`` ,  ``UINT32`` , ``UINT64`` then Kuiper tries to convert to ``Bigint`` type. 
 
 
-### Float
+#### Float
 
 
 If  ``Type`` value of ``ValueDescriptor`` is ``FLOAT32``, ``FLOAT64``, then Kuiper tries to convert to ``Float`` type. 
 If  ``Type`` value of ``ValueDescriptor`` is ``FLOAT32``, ``FLOAT64``, then Kuiper tries to convert to ``Float`` type. 
 
 
-### String
+#### String
 
 
 If  ``Type`` value of ``ValueDescriptor`` is ``String``, then Kuiper tries to convert to ``String`` type. 
 If  ``Type`` value of ``ValueDescriptor`` is ``String``, then Kuiper tries to convert to ``String`` type. 
 
 
-### Boolean array
+#### Boolean array
 
 
 `Bool` array type in EdgeX will be converted to `boolean` array.
 `Bool` array type in EdgeX will be converted to `boolean` array.
 
 
-### Bigint array
+#### Bigint array
 
 
 All of ``INT8`` , ``INT16``, ``INT32``,  ``INT64``,``UINT`` , ``UINT8`` , ``UINT16`` ,  ``UINT32`` , ``UINT64``  array types in EdgeX will be converted to `Bigint` array.
 All of ``INT8`` , ``INT16``, ``INT32``,  ``INT64``,``UINT`` , ``UINT8`` , ``UINT16`` ,  ``UINT32`` , ``UINT64``  array types in EdgeX will be converted to `Bigint` array.
 
 
-### Float array
+#### Float array
 
 
 All of ``FLOAT32``, ``FLOAT64``  array types in EdgeX will be converted to `Float` array.
 All of ``FLOAT32``, ``FLOAT64``  array types in EdgeX will be converted to `Float` array.
 
 
-# Global configurations
+## Global configurations
 
 
 The configuration file of EdgeX source is at ``$kuiper/etc/sources/edgex.yaml``. Below is the file format.
 The configuration file of EdgeX source is at ``$kuiper/etc/sources/edgex.yaml``. Below is the file format.
 
 
@@ -75,34 +75,34 @@ default:
 
 
 Use can specify the global EdgeX settings here. The configuration items specified in ``default`` section will be taken as default settings for all EdgeX source. 
 Use can specify the global EdgeX settings here. The configuration items specified in ``default`` section will be taken as default settings for all EdgeX source. 
 
 
-## protocol
+### protocol
 
 
 The protocol connect to EdgeX message bus, default value is ``tcp``.
 The protocol connect to EdgeX message bus, default value is ``tcp``.
 
 
-## server
+### server
 
 
 The server address of  EdgeX message bus, default value is ``localhost``.
 The server address of  EdgeX message bus, default value is ``localhost``.
 
 
-## port
+### port
 
 
 The port of EdgeX message bus, default value is ``5573``.
 The port of EdgeX message bus, default value is ``5573``.
 
 
-## topic
+### topic
 
 
 The topic name of EdgeX message bus,  default value is ``events``.
 The topic name of EdgeX message bus,  default value is ``events``.
 
 
-## serviceServer
+### serviceServer
 
 
 The base service address for getting value descriptors, the value of ``serviceServer`` will be concatenated to ``/api/v1/valuedescriptor`` to get all of value descriptors of EdgeX server.
 The base service address for getting value descriptors, the value of ``serviceServer`` will be concatenated to ``/api/v1/valuedescriptor`` to get all of value descriptors of EdgeX server.
 
 
-## type
+### type
 
 
 The EdgeX message bus type, currently two types of message buses are supported. If specified other values, then will use the default ``zero`` value.
 The EdgeX message bus type, currently two types of message buses are supported. If specified other values, then will use the default ``zero`` value.
 
 
 - ``zero``: Use ZeroMQ as EdgeX message bus. 
 - ``zero``: Use ZeroMQ as EdgeX message bus. 
 - ``mqtt``: Use the MQTT broker as EdgeX message bus.
 - ``mqtt``: Use the MQTT broker as EdgeX message bus.
 
 
-## optional
+### optional
 
 
 If MQTT message bus is used, some other optional configurations can be specified. Please notice that all of values in optional are **<u>string type</u>**, so values for these configurations should be string - such as ``KeepAlive: "5000"``. Below optional configurations are supported, please check MQTT specification for the detailed information.
 If MQTT message bus is used, some other optional configurations can be specified. Please notice that all of values in optional are **<u>string type</u>**, so values for these configurations should be string - such as ``KeepAlive: "5000"``. Below optional configurations are supported, please check MQTT specification for the detailed information.
 
 
@@ -120,7 +120,7 @@ If MQTT message bus is used, some other optional configurations can be specified
 - KeyPEMBlock
 - KeyPEMBlock
 - SkipCertVerify
 - SkipCertVerify
 
 
-## Override the default settings
+### Override the default settings
 
 
 In some cases, maybe you want to consume message from multiple topics from message bus.  Kuiper supports to specify another configuration, and use the ``CONF_KEY`` to specify the newly created key when you create a stream.
 In some cases, maybe you want to consume message from multiple topics from message bus.  Kuiper supports to specify another configuration, and use the ``CONF_KEY`` to specify the newly created key when you create a stream.
 
 

+ 6 - 6
docs/en_US/rules/state_and_fault_tolerance.md

@@ -1,16 +1,16 @@
-# State
+## State
 
 
 Kuiper supports stateful rule stream. There are two kinds of states in Kuiper:
 Kuiper supports stateful rule stream. There are two kinds of states in Kuiper:
 1. Internal state for window operation and rewindable source
 1. Internal state for window operation and rewindable source
 2. User state exposed to extensions with stream context, check [state storage](../extension/overview.md#state-storage).
 2. User state exposed to extensions with stream context, check [state storage](../extension/overview.md#state-storage).
 
 
-# Fault Tolerance
+## Fault Tolerance
 
 
 By default, all the states reside in memory only which means that if the stream exits abnormally, the states will disappear.
 By default, all the states reside in memory only which means that if the stream exits abnormally, the states will disappear.
 
 
 In order to make state fault tolerance, Kuipler need to checkpoint the state into persistent storage which will allow a recovery after failure.
 In order to make state fault tolerance, Kuipler need to checkpoint the state into persistent storage which will allow a recovery after failure.
 
 
-## Enable Checkpointing
+### Enable Checkpointing
 
 
 Set the rule option qos to 1 or 2 will enable the checkpointing. Configure the checkpoint interval by setting the checkpointInterval option.
 Set the rule option qos to 1 or 2 will enable the checkpointing. Configure the checkpoint interval by setting the checkpointInterval option.
 
 
@@ -24,9 +24,9 @@ Given that Kuiper recovers from faults by rewinding and replaying the source dat
 
 
 If you don’t need "exactly once", you can gain some performance by configuring Kuiper to use AT_LEAST_ONCE.
 If you don’t need "exactly once", you can gain some performance by configuring Kuiper to use AT_LEAST_ONCE.
 
 
-## Exactly Once End to End
+### Exactly Once End to End
 
 
-### Source consideration
+#### Source consideration
 
 
 To have an end to end qos of the stream, the source must be rewindable. That means after recovery, the source can be reverted to the checkpointed offset and resend data from that so that the whole stream can be replayed from the last failure.
 To have an end to end qos of the stream, the source must be rewindable. That means after recovery, the source can be reverted to the checkpointed offset and resend data from that so that the whole stream can be replayed from the last failure.
 
 
@@ -39,7 +39,7 @@ type Rewindable interface {
 }
 }
 ```
 ```
 
 
-### Sink consideration
+#### Sink consideration
 
 
 We cannot guarantee the sink to receive a data exactly once. If failures happen during the period of checkpointing, some states which have sent to the sink may not be checkpointed. And those states will be replayed as they are not restored because of not being checkpointed. In this case, the sink may receive them more than once. 
 We cannot guarantee the sink to receive a data exactly once. If failures happen during the period of checkpointing, some states which have sent to the sink may not be checkpointed. And those states will be replayed as they are not restored because of not being checkpointed. In this case, the sink may receive them more than once. 
 
 

+ 1 - 1
docs/en_US/sqls/built-in_functions.md

@@ -33,7 +33,7 @@ Aggregate functions perform a calculation on a set of values and return a single
     SELECT collect(*)[1]->a as r1 FROM test GROUP BY TumblingWindow(ss, 10)
     SELECT collect(*)[1]->a as r1 FROM test GROUP BY TumblingWindow(ss, 10)
     ```
     ```
  
  
- ### Deduplicate() Examples
+### Deduplicate() Examples
  
  
  - Get the whole array of the current window which is deduplicated by column `a`. The result will be like: `[{"r1":{"a":32, "b":"hello"}, {"a":45, "b":"world"}}]`
  - Get the whole array of the current window which is deduplicated by column `a`. The result will be like: `[{"r1":{"a":32, "b":"hello"}, {"a":45, "b":"world"}}]`
      ```sql
      ```sql

+ 9 - 9
docs/zh_CN/json_expr.md

@@ -1,4 +1,4 @@
-# 样本数据
+## 样本数据
 
 
 ```json
 ```json
 {
 {
@@ -29,9 +29,9 @@
 }
 }
 ```
 ```
 
 
-# 基本表达式
+## 基本表达式
 
 
-## 识别码
+### 识别码
 
 
 源引用 (`.`)
 源引用 (`.`)
 
 
@@ -56,7 +56,7 @@ SELECT name->first AS fname FROM demo
 {"fname": "Tom"}
 {"fname": "Tom"}
 ```
 ```
 
 
-## 索引表达式
+### 索引表达式
 
 
 索引表达式使您可以选择列表中的特定元素。 它看起来应该类似于普通编程语言中的数组访问。 索引基于0。
 索引表达式使您可以选择列表中的特定元素。 它看起来应该类似于普通编程语言中的数组访问。 索引基于0。
 
 
@@ -81,7 +81,7 @@ SELECT d.friends[0]->last FROM demo AS d
 }
 }
 ```
 ```
 
 
-# 切片
+## 切片
 
 
 切片允许您选择数组的连续子集。
 切片允许您选择数组的连续子集。
 
 
@@ -122,7 +122,7 @@ SELECT followers->Group1[:1]->first FROM demo
 }
 }
 ```
 ```
 
 
-# Json 路径函数
+## Json 路径函数
 
 
 Kuiper 提供了一系列函数,以允许通过结构或数组列或值进行 json 路径操作。 这些函数是:
 Kuiper 提供了一系列函数,以允许通过结构或数组列或值进行 json 路径操作。 这些函数是:
 
 
@@ -183,11 +183,11 @@ SELECT json_path_exists(followers, "$[\"my.follower\"]") FROM demo
 
 
 
 
 
 
-# *映射*
+## *映射*
 
 
 <!--Do we need to support this?-->
 <!--Do we need to support this?-->
 
 
-## 列表和切片映射
+### 列表和切片映射
 
 
 通配符表达式创建列表映射,它是 JSON 数组上的映射。
 通配符表达式创建列表映射,它是 JSON 数组上的映射。
 
 
@@ -207,7 +207,7 @@ SELECT friends[:1]->first FROM demo
 }
 }
 ```
 ```
 
 
-## 对象映射
+### 对象映射
 
 
 
 
 
 

+ 8 - 8
docs/zh_CN/operation/install/overview.md

@@ -1,11 +1,11 @@
-# 安装说明
+## 安装说明
 
 
 请下载安装程序包,有关不同操作系统的安装说明,请参阅以下内容。
 请下载安装程序包,有关不同操作系统的安装说明,请参阅以下内容。
 
 
 - [Cent-OS](cent-os.md)
 - [Cent-OS](cent-os.md)
 - ...
 - ...
 
 
-# 安装目录结构 
+## 安装目录结构 
 
 
 下面是安装后的目录结构。
 下面是安装后的目录结构。
 
 
@@ -20,27 +20,27 @@ plugins
 log
 log
 ```
 ```
 
 
-## bin
+### bin
 
 
 `bin` 目录包含所有可执行文件。 如 `kuiper` 命令。
 `bin` 目录包含所有可执行文件。 如 `kuiper` 命令。
 
 
-## etc
+### etc
 
 
 `etc` 目录包含 Kuiper 的配置文件, 例如 MQTT 源配置等。
 `etc` 目录包含 Kuiper 的配置文件, 例如 MQTT 源配置等。
 
 
-## data
+### data
 
 
 Kuiper 会持久化流和规则的所有定义,并且所有消息都将存储在此文件夹中,以进行长时间操作。
 Kuiper 会持久化流和规则的所有定义,并且所有消息都将存储在此文件夹中,以进行长时间操作。
 
 
-## plugins
+### plugins
 
 
 Kuiper 允许用户开发自己的插件,并将这些插件放入此文件夹。 有关如何扩展 Kuiper 的更多信息,请参见[扩展](../../extension/overview.md)。
 Kuiper 允许用户开发自己的插件,并将这些插件放入此文件夹。 有关如何扩展 Kuiper 的更多信息,请参见[扩展](../../extension/overview.md)。
 
 
-## log
+### log
 
 
 所有日志文件都在此文件夹下。 默认的日志文件名为 `stream.log`。
 所有日志文件都在此文件夹下。 默认的日志文件名为 `stream.log`。
 
 
-# 下一步
+## 下一步
 
 
 - 参考 [入门指导](../../getting_started.md) 开始您的 Kuiper 体验。
 - 参考 [入门指导](../../getting_started.md) 开始您的 Kuiper 体验。
 - 参考 [CLI 工具](../../cli/overview.md) 了解 Kuiper CLI 工具的使用。
 - 参考 [CLI 工具](../../cli/overview.md) 了解 Kuiper CLI 工具的使用。

+ 1 - 1
docs/zh_CN/plugins/functions/functions.md

@@ -16,7 +16,7 @@ echo(avg) 示例
   SELECT echo(avg) as r1 FROM test;
   SELECT echo(avg) as r1 FROM test;
   ```
   ```
 
 
-###  countPlusOne 插件
+### countPlusOne 插件
 
 
 | 函数         | 示例              | 说明                 |
 | 函数         | 示例              | 说明                 |
 | ------------ | ----------------- | -------------------- |
 | ------------ | ----------------- | -------------------- |

+ 6 - 6
docs/zh_CN/plugins/overview.md

@@ -31,17 +31,17 @@ source 的大部分属性用户通过对应的配置文件指定,用户无法
 
 
   这部分包含了插件的作者信息,插件开发者可以视情况提供这些信息,这部分信息会被展示在管理控制台的插件信息列表上。
   这部分包含了插件的作者信息,插件开发者可以视情况提供这些信息,这部分信息会被展示在管理控制台的插件信息列表上。
 
 
-      * name:名字
-      * email:电子邮件地址
-      * company:公司名称
-      * website:公司网站地址
+  * name:名字
+  * email:电子邮件地址
+  * company:公司名称
+  * website:公司网站地址
 
 
 * helpUrl
 * helpUrl
 
 
   该插件的帮助文件地址,控制台会根据语言的支持情况,链接到对应的帮助文档中。
   该插件的帮助文件地址,控制台会根据语言的支持情况,链接到对应的帮助文档中。
 
 
-      * en_US:英文文档帮助地址
-      * zh_CN:中文文档帮助地址
+  * en_US:英文文档帮助地址
+  * zh_CN:中文文档帮助地址
 
 
 * description
 * description
 
 

+ 9 - 9
docs/zh_CN/rules/overview.md

@@ -1,4 +1,4 @@
-# 规则
+## 规则
 
 
 规则由 JSON 定义,下面是一个示例。
 规则由 JSON 定义,下面是一个示例。
 
 
@@ -22,7 +22,7 @@
 
 
 创建规则需要以下3个参数。
 创建规则需要以下3个参数。
 
 
-## 参数
+### 参数
 
 
 | 参数名 | 是否可选 | 说明                |
 | 参数名 | 是否可选 | 说明                |
 | ------------- | -------- | ------------------------------------------------------------ |
 | ------------- | -------- | ------------------------------------------------------------ |
@@ -31,15 +31,15 @@
 | actions           | 否   | Sink 动作数组 |
 | actions           | 否   | Sink 动作数组 |
 | options           | 是       | 选项图     |
 | options           | 是       | 选项图     |
 
 
-## id
+### id
 
 
 规则的标识。 规则名称不能在同一 Kuiper 实例中重复。
 规则的标识。 规则名称不能在同一 Kuiper 实例中重复。
 
 
-## sql
+### sql
 
 
 为规则运行的 sql 查询。
 为规则运行的 sql 查询。
 
 
-### 选项
+#### 选项
 
 
 当前的选项包括:
 当前的选项包括:
 
 
@@ -57,7 +57,7 @@
 
 
 可以在 `rules` 下属的 `etc/kuiper.yaml` 中全局定义规则选项。 规则 json 中定义的选项将覆盖全局设置。
 可以在 `rules` 下属的 `etc/kuiper.yaml` 中全局定义规则选项。 规则 json 中定义的选项将覆盖全局设置。
 
 
-## 源
+###
 
 
 - Kuiper 支持以下 3 种内置源:
 - Kuiper 支持以下 3 种内置源:
   - MQTT 源,有关更多详细信息,请参阅 [MQTT source stream](https://github.com/emqx/kuiper/blob/master/docs/zh_CN/rules/sources/mqtt.md)。
   - MQTT 源,有关更多详细信息,请参阅 [MQTT source stream](https://github.com/emqx/kuiper/blob/master/docs/zh_CN/rules/sources/mqtt.md)。
@@ -66,7 +66,7 @@
 - 有关Kuiper SQL 的更多信息,请参阅 [SQL](https://github.com/emqx/kuiper/blob/master/docs/zh_CN/sqls/overview.md)。
 - 有关Kuiper SQL 的更多信息,请参阅 [SQL](https://github.com/emqx/kuiper/blob/master/docs/zh_CN/sqls/overview.md)。
 - 可以自定义来源,请参阅 [extension](https://github.com/emqx/kuiper/blob/master/docs/zh_CN/extension/overview.md)了解更多详细信息。
 - 可以自定义来源,请参阅 [extension](https://github.com/emqx/kuiper/blob/master/docs/zh_CN/extension/overview.md)了解更多详细信息。
 
 
-### 目标/动作
+#### 目标/动作
 
 
 当前,支持以下目标/动作:
 当前,支持以下目标/动作:
 
 
@@ -91,7 +91,7 @@
 | sendSingle        | true     | 输出消息以数组形式接收,该属性意味着是否将结果一一发送。 如果为false,则输出消息将为`{"result":"${the string of received message}"}`。 例如,`{"result":"[{\"count\":30},"\"count\":20}]"}`。否则,结果消息将与实际字段名称一一对应发送。 对于与上述相同的示例,它将发送 `{"count":30}`,然后发送`{"count":20} `到 RESTful 端点。默认为 false。 |
 | sendSingle        | true     | 输出消息以数组形式接收,该属性意味着是否将结果一一发送。 如果为false,则输出消息将为`{"result":"${the string of received message}"}`。 例如,`{"result":"[{\"count\":30},"\"count\":20}]"}`。否则,结果消息将与实际字段名称一一对应发送。 对于与上述相同的示例,它将发送 `{"count":30}`,然后发送`{"count":20} `到 RESTful 端点。默认为 false。 |
 | dataTemplate      | true     | [golang 模板](https://golang.org/pkg/html/template)格式字符串,用于指定输出数据格式。 模板的输入是目标消息,该消息始终是映射数组。 如果未指定数据模板,则将数据作为原始输入。 |
 | dataTemplate      | true     | [golang 模板](https://golang.org/pkg/html/template)格式字符串,用于指定输出数据格式。 模板的输入是目标消息,该消息始终是映射数组。 如果未指定数据模板,则将数据作为原始输入。 |
 
 
-#### 数据模板
+##### 数据模板
 用户可以参考 [Kuiper 中使用 Golang 模版 (template) 定制分析结果](data_template.md) 来获取更多的关于数据模版的使用场景。
 用户可以参考 [Kuiper 中使用 Golang 模版 (template) 定制分析结果](data_template.md) 来获取更多的关于数据模版的使用场景。
 
 
 如果 sendSingle 为 true,则数据模板将针对某一条记录执行操作; 否则,它将对整个记录数组执行操作。 典型的数据模板是:
 如果 sendSingle 为 true,则数据模板将针对某一条记录执行操作; 否则,它将对整个记录数组执行操作。 典型的数据模板是:
@@ -152,7 +152,7 @@
 
 
 可以自定义动作以支持不同种类的输出,有关更多详细信息,请参见 [extension](../extension/overview.md) 。
 可以自定义动作以支持不同种类的输出,有关更多详细信息,请参见 [extension](../extension/overview.md) 。
 
 
-#### 模版中支持的函数
+##### 模版中支持的函数
 
 
 Kuiper 扩展了几个可以在模版中使用的函数。
 Kuiper 扩展了几个可以在模版中使用的函数。
 
 

+ 1 - 1
docs/zh_CN/sqls/built-in_functions.md

@@ -33,7 +33,7 @@ Kuiper 具有许多内置函数,可以对数据执行计算。
     SELECT collect(*)[1]->a as r1 FROM test GROUP BY TumblingWindow(ss, 10)
     SELECT collect(*)[1]->a as r1 FROM test GROUP BY TumblingWindow(ss, 10)
     ```
     ```
  
  
- ### Deduplicate() 示例
+### Deduplicate() 示例
  
  
  - 获取当前窗口中,列 `a` 值不重复的所有消息组成的数组。结果为: `[{"r1":{"a":32, "b":"hello"}, {"a":45, "b":"world"}}]`
  - 获取当前窗口中,列 `a` 值不重复的所有消息组成的数组。结果为: `[{"r1":{"a":32, "b":"hello"}, {"a":45, "b":"world"}}]`
      ```sql
      ```sql