Преглед изворни кода

refactor(conf): clean up ui meta files

Closes #1026

Signed-off-by: Jiyong Huang <huangjy@emqx.io>
Jiyong Huang пре 3 година
родитељ
комит
8fc20c4ac5

+ 10 - 10
docs/directory.json

@@ -49,7 +49,7 @@
 						},
 						{
 							"title": "日志操作",
-							"path": "rules/sinks/logs"
+							"path": "rules/sinks/log"
 						}
 					]
 				},
@@ -137,9 +137,9 @@
 			]
 		},
 		{
-			"title": "Kuiper SQL 参考",
+			"title": "eKuiper SQL 参考",
 			"children": [{
-					"title": "Kuiper SQL 介绍",
+					"title": "eKuiper SQL 介绍",
 					"path": "sqls/overview"
 				},
 				{
@@ -159,7 +159,7 @@
 					"path": "sqls/built-in_functions"
 				},
 				{
-					"title": "Kuiper 词汇元素",
+					"title": "eKuiper 词汇元素",
 					"path": "sqls/lexical_elements"
 				},
 				{
@@ -169,7 +169,7 @@
 			]
 		},
 		{
-			"title": "扩展 Kuiper",
+			"title": "扩展 eKuiper",
 			"children": [{
 				"title": "扩展",
 				"path": "extension/overview"
@@ -339,7 +339,7 @@
 						},
 						{
 							"title": "Log action",
-							"path": "rules/sinks/logs"
+							"path": "rules/sinks/log"
 						}
 					]
 				},
@@ -391,7 +391,7 @@
 			]
 		},
 		{
-			"title": "Kuiper management console",
+			"title": "eKuiper management console",
 			"children": [{
 					"title": "Introduction",
 					"path": "manager-ui/overview"
@@ -427,7 +427,7 @@
 			]
 		},
 		{
-			"title": "Kuiper SQL",
+			"title": "eKuiper SQL",
 			"children": [{
 					"title": "Introduction",
 					"path": "sqls/overview"
@@ -449,7 +449,7 @@
 					"path": "sqls/built-in_functions"
 				},
 				{
-					"title": "Kuiper lexical elements",
+					"title": "eKuiper lexical elements",
 					"path": "sqls/lexical_elements"
 				},
 				{
@@ -459,7 +459,7 @@
 			]
 		},
 		{
-			"title": "Extend Kuiper",
+			"title": "Extend eKuiper",
 			"children": [{
 					"title": "Introduction",
 					"path": "extension/overview"

+ 1 - 1
docs/en_US/extension/native/overview.md

@@ -3,7 +3,7 @@
 eKuiper allows user to customize the different kinds of extensions by the native golang plugin system. 
 
 - The source extension is used for extending different stream source, such as consuming data from other message brokers. eKuiper has built-in source support for [MQTT broker](../../rules/sources/mqtt.md).
-- Sink/Action extension is used for extending pub/push data to different targets, such as database, other message system, web interfaces or file systems. Built-in action is supported in eKuiper, see [MQTT](../../rules/sinks/mqtt.md) & [log files](../../rules/sinks/logs.md).
+- Sink/Action extension is used for extending pub/push data to different targets, such as database, other message system, web interfaces or file systems. Built-in action is supported in eKuiper, see [MQTT](../../rules/sinks/mqtt.md) & [log files](../../rules/sinks/log.md).
 - Functions extension allows user to extend different functions that used in SQL. Built-in functions is supported in eKuiper, see [functions](../../sqls/built-in_functions.md).
 
 Please read the following to learn how to implement different extensions.

+ 1 - 1
docs/en_US/extension/native/sink.md

@@ -1,6 +1,6 @@
 # Sink Extension
 
-Sink feed data from eKuiper into external systems. eKuiper has built-in sink support for [MQTT broker](../../rules/sinks/mqtt.md) and [log sink](../../rules/sinks/logs.md). There are still needs to publish data to various external systems include messaging systems and database etc. Sink extension is presented to meet this requirement.
+Sink feed data from eKuiper into external systems. eKuiper has built-in sink support for [MQTT broker](../../rules/sinks/mqtt.md) and [log sink](../../rules/sinks/log.md). There are still needs to publish data to various external systems include messaging systems and database etc. Sink extension is presented to meet this requirement.
 
 ## Developing
 

+ 1 - 1
docs/en_US/rules/overview.md

@@ -71,7 +71,7 @@ The rule options can be defined globally in ``etc/kuiper.yaml`` under the ``rule
 
 Currently, below kinds of sinks/actions are supported:
 
-- [log](./sinks/logs.md): Send the result to log file.
+- [log](./sinks/log.md): Send the result to log file.
 - [mqtt](./sinks/mqtt.md): Send the result to an MQTT broker.
 - [edgex](./sinks/edgex.md): Send the result to EdgeX message bus.
 - [rest](./sinks/rest.md): Send the result to a Rest HTTP server.

docs/en_US/rules/sinks/logs.md → docs/en_US/rules/sinks/log.md


+ 1 - 1
docs/zh_CN/extension/native/overview.md

@@ -17,7 +17,7 @@ eKuiper 允许用户自定义扩展,以支持更多的功能。用户可编写
 eKuiper 允许用户自定义不同类型的扩展。 
 
 - 源扩展用于扩展不同的流源,例如使用来自其他消息服务器的数据。eKuiper 对 [MQTT 消息服务器](../../rules/sources/mqtt.md)的内置源提供支持。
-- Sink/Action 扩展用于将发布/推送数据扩展到不同的目标,例如数据库,其他消息系统,Web 界面或文件系统。eKuiper 中提供内置动作支持,请参阅  [MQTT](../../rules/sinks/mqtt.md)  & [日志文件](../../rules/sinks/logs.md).。
+- Sink/Action 扩展用于将发布/推送数据扩展到不同的目标,例如数据库,其他消息系统,Web 界面或文件系统。eKuiper 中提供内置动作支持,请参阅  [MQTT](../../rules/sinks/mqtt.md)  & [日志文件](../../rules/sinks/log.md).。
 - 函数扩展允许用户扩展 SQL 中使用的不同函数。 eKuiper支持内置函数,请参见 [函数](../../sqls/built-in_functions.md)。
 
 请阅读以下内容,了解如何实现不同的扩展。

+ 1 - 1
docs/zh_CN/extension/native/sink.md

@@ -1,6 +1,6 @@
 # 目标 (Sink) 扩展
 
-eKuiper 可以将数据接收到外部系统。 eKuiper具有对  [MQTT 消息服务器](../../rules/sinks/mqtt.md) 和 [日志目标](../../rules/sinks/logs.md)的内置接收器支持。然而, 仍然需要将数据发布到各种外部系统,包括消息传递系统和数据库等。Sink (目标)扩展正是为了满足这一要求。
+eKuiper 可以将数据接收到外部系统。 eKuiper具有对  [MQTT 消息服务器](../../rules/sinks/mqtt.md) 和 [日志目标](../../rules/sinks/log.md)的内置接收器支持。然而, 仍然需要将数据发布到各种外部系统,包括消息传递系统和数据库等。Sink (目标)扩展正是为了满足这一要求。
 
 ## 开发
 

+ 1 - 1
docs/zh_CN/extension/overview.md

@@ -17,7 +17,7 @@ eKuiper 允许用户自定义扩展,以支持更多的功能。用户可编写
 eKuiper 允许用户自定义不同类型的扩展。 
 
 - 源扩展用于扩展不同的流源,例如使用来自其他消息服务器的数据。eKuiper 对 [MQTT 消息服务器](../rules/sources/mqtt.md)的内置源提供支持。
-- Sink/Action 扩展用于将发布/推送数据扩展到不同的目标,例如数据库,其他消息系统,Web 界面或文件系统。eKuiper 中提供内置动作支持,请参阅  [MQTT](../rules/sinks/mqtt.md)  & [日志文件](../rules/sinks/logs.md).。
+- Sink/Action 扩展用于将发布/推送数据扩展到不同的目标,例如数据库,其他消息系统,Web 界面或文件系统。eKuiper 中提供内置动作支持,请参阅  [MQTT](../rules/sinks/mqtt.md)  & [日志文件](../rules/sinks/log.md).。
 - 函数扩展允许用户扩展 SQL 中使用的不同函数。 eKuiper支持内置函数,请参见 [函数](../sqls/built-in_functions.md)。
 
 请阅读以下内容,了解如何实现不同的扩展。

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

@@ -71,7 +71,7 @@
 
 当前,支持以下目标/动作:
 
-- [log](./sinks/logs.md): 将结果发送到日志文件。
+- [log](./sinks/log.md): 将结果发送到日志文件。
 - [mqtt](./sinks/mqtt.md): 将结果发送到 MQTT 消息服务器。 
 - [edgex](./sinks/edgex.md): 将结果发送到 EdgeX 消息总线。
 - [rest](./sinks/rest.md): 将结果发送到 Rest HTTP 服务器。

+ 1 - 1
docs/zh_CN/rules/sinks/edgex.md

@@ -19,7 +19,7 @@
 | messageType   | 是   | EdgeX 消息模型类型。若要将消息发送为类似 apllication service 的 event 类型,则应设置为 `event`。否则,若要将消息发送为类似 device service 或者 core data service 的 event request 类型,则应设置为 `request`。如未指定,使用缺省值 ``event`` 。|
 
 | metadata    | 是    | 该属性为一个字段名称,该字段是 SQL SELECT 子句的一个字段名称,这个字段应该类似于 `meta(*) AS xxx` ,用于选出消息中所有的 EdgeX 元数据 。 |
-| profileName  | 是    | 允许用户指定设备名称,该名称将作为从 eKuiper 中发送出来的 Event 结构体的 profile 名称。若在 metadata 中设置了 profileName 将会优先采用。|
+| profileName  | 是    | 允许用户指定 Profile 名称,该名称将作为从 eKuiper 中发送出来的 Event 结构体的 profile 名称。若在 metadata 中设置了 profileName 将会优先采用。|
 | deviceName  | 是    | 允许用户指定设备名称,该名称将作为从 eKuiper 中发送出来的 Event 结构体的设备名称。若在 metadata 中设置了 deviceName 将会优先采用。 |
 | sourceName    | 是   | 允许用户指定源名称,该名称将作为从 eKuiper 中发送出来的 Event 结构体的源名称。若在 metadata 中设置了 sourceName 将会优先采用。 |
 | optional      | 是    | 如果指定了 `mqtt` 消息总线,那么还可以指定一下可选的值。请参考以下可选的支持的配置类型。 |

+ 0 - 0
docs/zh_CN/rules/sinks/logs.md


+ 30 - 2
etc/functions/internal.json

@@ -12,8 +12,8 @@
 			"zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/sqls/built-in_functions.md"
 		},
 		"description": {
-			"en_US": "Kuiper has many built-in functions for performing calculations on data.",
-			"zh_CN": "Kuiper 具有许多内置函数,可以对数据执行计算。"
+			"en_US": "eKuiper has many built-in functions for performing calculations on data.",
+			"zh_CN": "eKuiper 具有许多内置函数,可以对数据执行计算。"
 		}
 	},
 	"functions": [{
@@ -59,6 +59,13 @@
 			"zh_CN": "返回组中指定的列或整个消息(参数为*时)的值组成的数组。"
 		}
 	}, {
+		"name": "deduplicate",
+		"example": "deduplicate(col, false), deduplicate(col, true)",
+		"hint": {
+			"en_US": "Returns the deduplicate results in the group, usually a window. The first argument is the column as the key to deduplicate; the second argument is whether to return all items or just the latest item which is not duplicate. If the latest item is a duplicate, the sink will receive an empty map.",
+			"zh_CN": "返回当前组去重的结果,通常用在窗口中。其中,第一个参数指定用于去重的列;第二个参数指定是否返回全部结果。若为 false ,则仅返回最近的未重复的项;若最近的项有重复,则返回空数组。"
+		}
+	}, {
 		"name": "abs",
 		"example": "abs(col1)",
 		"hint": {
@@ -485,5 +492,26 @@
 			"en_US": "Returns the meta-data of specified key. The key could be: - a standalone key if there is only one source in the from clause, such as meta(device) - A qualified key to specify the stream, such as meta(src1.device) - A key with arrow for multi level meta data, such as meta(src1.reading->device->name) This assumes reading is a map structure meta data.",
 			"zh_CN": "返回指定键的元数据。 键可能是:-如果 from 子句中只有一个来源,则为独立键,例如meta(device) -用于指定流的合格键,例如 meta(src1.device) -用于多级元数据的带有箭头的键,例如 meta(src1.reading->device->name)。这里假定读取是地图结构元数据。"
 		}
+	}, {
+		"name": "cardinality",
+		"example": "cardinality(col)",
+		"hint": {
+			"en_US": "The number of members in the group. The null value is 0.",
+			"zh_CN": "组中成员的数量。空值为0。"
+		}
+	}, {
+		"name": "window_start",
+		"example": "window_start()",
+		"hint": {
+			"en_US": "Return the window start timestamp in int64 format. If there is no time window, it returns 0. The window time is aligned with the timestamp notion of the rule. If the rule is using processing time, then the window start timestamp is the processing timestamp. If the rule is using event time, then the window start timestamp is the event timestamp.",
+			"zh_CN": "返回窗口的开始时间戳,格式为 int64。若运行时没有时间窗口,则返回默认值0。窗口的时间与规则所用的时间系统相同。若规则采用处理时间,则窗口的时间也为处理时间;若规则采用事件事件,则窗口的时间也为事件时间。"
+		}
+	}, {
+		"name": "window_end",
+		"example": "window_end()",
+		"hint": {
+			"en_US": "Return the window end timestamp in int64 format. If there is no time window, it returns 0. The window time is aligned with the timestamp notion of the rule. If the rule is using processing time, then the window start timestamp is the processing timestamp. If the rule is using event time, then the window start timestamp is the event timestamp.",
+			"zh_CN": "返回窗口的结束时间戳,格式为 int64。若运行时没有时间窗口,则返回默认值0。窗口的时间与规则所用的时间系统相同。若规则采用处理时间,则窗口的时间也为处理时间;若规则采用事件事件,则窗口的时间也为事件时间。"
+		}
 	}]
 }

+ 2 - 9
etc/functions/windows.json

@@ -12,8 +12,8 @@
 			"zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/sqls/windows.md"
 		},
 		"description": {
-			"en_US": "In time-streaming scenarios, performing operations on the data contained in temporal windows is a common pattern. Kuiper has native support for windowing functions, enabling you to author complex stream processing jobs with minimal effort.",
-			"zh_CN": "在时间流场景中,对时态窗口中包含的数据执行操作是一种常见的模式。Kuiper 对窗口函数提供本机支持,使您能够以最小的工作量编写复杂的流处理作业。"
+			"en_US": "In time-streaming scenarios, performing operations on the data contained in temporal windows is a common pattern. eKuiper has native support for windowing functions, enabling you to author complex stream processing jobs with minimal effort.",
+			"zh_CN": "在时间流场景中,对时态窗口中包含的数据执行操作是一种常见的模式。eKuiper 对窗口函数提供本机支持,使您能够以最小的工作量编写复杂的流处理作业。"
 		}
 	},
 	"functions": [{
@@ -51,12 +51,5 @@
 			"en_US": "Tumbling count window is similar to general tumbling window, events in a tumbling window can not repeat, do not overlap, and an event cannot belong to more than one tumbling window. Below is a count window with 5 events length.",
 			"zh_CN": "滚动计数窗口与一般的滚动窗口类似,在滚动窗口中的事件不重复、不重叠,一个事件不会属于多个滚动窗口。以下是一个长度为 5 的滚动计数窗口。"
 		}
-	}, {
-		"name": "TIMESTAMP",
-		"example":"CREATE STREAM demo ( color STRING, size BIGINT, ts BIGINT ) WITH (DATASOURCE=\"demo\", FORMAT=\"json\", KEY=\"ts\", TIMESTAMP=\"ts\"", 
-		"hint": {
-			"en_US": "Every event has a timestamp associated with it. The timestamp will be used to calculate the window. ",
-			"zh_CN": "每个事件都有一个与之关联的时间戳。 时间戳将用于计算窗口。"
-		}
 	}]
 }

+ 2 - 2
etc/mqtt_source.json

@@ -12,8 +12,8 @@
 			"zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sources/mqtt.md"
 		},
 		"description": {
-			"en_US": "Kuiper provides built-in support for MQTT source stream, which can subscribe the message from MQTT broker and feed into the Kuiper processing pipeline.",
-			"zh_CN": "Kuiper 为 MQTT 源流提供了内置支持,流可以订阅来自 MQTT 代理的消息并输入Kuiper 处理管道。"
+			"en_US": "eKuiper provides built-in support for MQTT source stream, which can subscribe the message from MQTT broker and feed into the eKuiper processing pipeline.",
+			"zh_CN": "eKuiper 为 MQTT 源流提供了内置支持,流可以订阅来自 MQTT 代理的消息并输入 eKuiper 处理管道。"
 		}
 	},
 	"libs": [],

+ 92 - 22
etc/sinks/edgex.json

@@ -8,8 +8,8 @@
       "website": "https://www.emqx.io"
     },
     "helpUrl": {
-      "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/rules/sinks/mqtt.md",
-      "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sinks/mqtt.md"
+      "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/rules/sinks/edgex.md",
+      "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sinks/edgex.md"
     },
     "description": {
       "en_US": "The action is used for publishing output message into EdgeX message bus.",
@@ -35,17 +35,18 @@
     },
     {
       "name": "protocol",
-      "default": "tcp",
+      "default": "redis",
       "optional": true,
       "control": "select",
       "connection_related": true,
       "values": [
-        "tcp"
+        "tcp",
+        "redis"
       ],
       "type": "list_string",
       "hint": {
-        "en_US": "The protocol. If it's not specified, then use default value 'tcp'.",
-        "zh_CN": "协议,如未指定,使用缺省值 tcp。"
+        "en_US": "The protocol. If it's not specified, then use default value 'redis'.",
+        "zh_CN": "协议,如未指定,使用缺省值 redis。"
       },
       "label": {
         "en_US": "Protocol",
@@ -56,12 +57,12 @@
       "name": "host",
       "optional": true,
       "control": "text",
-      "default": "*",
+      "default": "localhost",
       "type": "string",
       "connection_related": true,
       "hint": {
-        "en_US": "The host of message bus. If not specified, then use default value '*'",
-        "zh_CN": "消息总线主机地址,使用缺省值 *."
+        "en_US": "The host of message bus. If not specified, then use default value 'localhost'",
+        "zh_CN": "消息总线主机地址,使用缺省值 localhost."
       },
       "label": {
         "en_US": "Binding host",
@@ -72,7 +73,7 @@
       "name": "port",
       "optional": true,
       "control": "text",
-      "default": 5563,
+      "default": 6379,
       "type": "int",
       "connection_related": true,
       "hint": {
@@ -86,13 +87,13 @@
     },
     {
       "name": "topic",
-      "default": "events",
+      "default": "application",
       "optional": true,
       "control": "text",
       "type": "string",
       "hint": {
-        "en_US": "The topic to be published. If not specified, then use default value 'events'.",
-        "zh_CN": "发布的主题名称,如未指定,使用缺省值 events."
+        "en_US": "The topic to be published. If not specified, then use default value 'application'.",
+        "zh_CN": "发布的主题名称,如未指定,使用缺省值 application."
       },
       "label": {
         "en_US": "Topic",
@@ -100,6 +101,61 @@
       }
     },
     {
+      "name": "topicPrefix",
+      "default": "",
+      "optional": true,
+      "control": "text",
+      "type": "string",
+      "hint": {
+        "en_US": "The prefix of a dynamic topic to be published. The topic will become a concatenation of `$topicPrefix/$profileName/$deviceName/$sourceName`",
+        "zh_CN": " 发布的主题的前缀。发送的主题将采用动态拼接,格式为`$topicPrefix/$profileName/$deviceName/$sourceName` 。"
+      },
+      "label": {
+        "en_US": "Topic",
+        "zh_CN": "主题"
+      }
+    },
+    {
+      "name": "type",
+      "default": "redis",
+      "optional": true,
+      "control": "select",
+      "connection_related": true,
+      "values": [
+        "mqtt",
+        "zero",
+        "redis"
+      ],
+      "type": "list_string",
+      "hint": {
+        "en_US": "The message bus type, two types of message buses are supported,'redis', 'zero' or 'mqtt', and 'redis' is the default value.",
+        "zh_CN": "消息总线类型,目前支持两种类型的消息总线,'redis', 'zero' 或者 'mqtt',其中 'redis' 为缺省类型。"
+      },
+      "label": {
+        "en_US": "Message bus type",
+        "zh_CN": "消息总线类型"
+      }
+    },
+    {
+      "name": "messageType",
+      "default": "event",
+      "optional": true,
+      "control": "select",
+      "values": [
+        "event",
+        "request"
+      ],
+      "type": "list_string",
+      "hint": {
+        "en_US": "The EdgeX message model type. To publish the message as an event like EdgeX application service, use `event`. Otherwise, to publish the message as an event request like EdgeX device service or core data service, use `request`. If not specified, then use the default value `event`.",
+        "zh_CN": "EdgeX 消息模型类型。若要将消息发送为类似 apllication service 的 event 类型,则应设置为 `event`。否则,若要将消息发送为类似 device service 或者 core data service 的 event request 类型,则应设置为 `request`。如未指定,使用缺省值 `event` 。"
+      },
+      "label": {
+        "en_US": "Message type",
+        "zh_CN": "消息类型"
+      }
+    },
+    {
       "name": "contentType",
       "default": "application/json",
       "optional": true,
@@ -136,8 +192,8 @@
       "control": "text",
       "type": "string",
       "hint": {
-        "en_US": "Allows user to specify the device name in the event structure that are sent from Kuiper.",
-        "zh_CN": "允许用户指定设备名称,该名称将作为从 Kuiper 中发送出来的 Event 结构体的设备名称"
+        "en_US": "Allows user to specify the device name in the event structure that are sent from eKuiper.",
+        "zh_CN": "允许用户指定设备名称,该名称将作为从 eKuiper 中发送出来的 Event 结构体的设备名称"
       },
       "label": {
         "en_US": "Device name",
@@ -145,23 +201,37 @@
       }
     },
     {
-      "name": "type",
-      "default": "zero",
+      "name": "profileName",
+      "default": "",
+      "optional": true,
+      "control": "text",
+      "type": "string",
+      "hint": {
+        "en_US": "Allows user to specify the profile name in the event structure that are sent from eKuiper. The profileName in the meta take precedence if specified.",
+        "zh_CN": "允许用户指定设备名称,该名称将作为从 eKuiper 中发送出来的 Event 结构体的 profile 名称。若在 metadata 中设置了 profileName 将会优先采用。"
+      },
+      "label": {
+        "en_US": "Profile name",
+        "zh_CN": "Profile 名称"
+      }
+    },
+    {
+      "name": "sourceName",
+      "default": "",
       "optional": true,
       "control": "select",
-      "connection_related": true,
       "values": [
         "mqtt",
         "zero"
       ],
       "type": "list_string",
       "hint": {
-        "en_US": "The message bus type, two types of message buses are supported, 'zero' or 'mqtt', and 'zero' is the default value.",
-        "zh_CN": "消息总线类型,目前支持两种类型的消息总线,'zero' 或者 'mqtt',其中 'zero' 为缺省类型。"
+        "en_US": "Allows user to specify the source name in the event structure that are sent from eKuiper. The sourceName in the meta take precedence if specified.",
+        "zh_CN": "允许用户指定源名称,该名称将作为从 eKuiper 中发送出来的 Event 结构体的源名称。若在 metadata 中设置了 sourceName 将会优先采用。"
       },
       "label": {
-        "en_US": "Message bus type",
-        "zh_CN": "消息总线类型"
+        "en_US": "Source name",
+        "zh_CN": "源名称"
       }
     },
     {

+ 4 - 4
etc/sinks/log.json

@@ -8,12 +8,12 @@
       "website": "https://www.emqx.io"
     },
     "helpUrl": {
-      "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/rules/sinks/mqtt.md",
-      "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sinks/mqtt.md"
+      "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/rules/sinks/log.md",
+      "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sinks/log.md"
     },
     "description": {
-      "en_US": "The action is used for print output message into log file, the log file is at $kuiper_install/log/stream.log by default.",
-      "zh_CN": "该操作用于将输出消息打印到日志文件中,默认情况下,该日志文件位于 $kuiper_install/log/stream.log 中。"
+      "en_US": "The action is used for print output message into log file, the log file is at $ekuiper_install/log/stream.log by default.",
+      "zh_CN": "该操作用于将输出消息打印到日志文件中,默认情况下,该日志文件位于 $ekuiper_install/log/stream.log 中。"
     }
   },
   "properties": [

+ 1 - 1
etc/sinks/redis.json

@@ -17,7 +17,7 @@
 		}
 	},
 	"libs": [
-		"github.com/go-redis/redis/v8"
+		"github.com/go-redis/redis/v7"
 	],
 	"properties": [
 		{

+ 15 - 9
etc/sources/edgex.json

@@ -12,8 +12,8 @@
 			"zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sources/edgex.md"
 		},
 		"description": {
-			"en_US": "Kuiper provides built-in support for EdgeX source stream, which can subscribe the message from EdgeX message bus and feed into the Kuiper streaming process pipeline.",
-			"zh_CN": "Kuiper 提供了内置的 EdgeX 源支持,它可以被用来订阅来自于EdgeX 消息总线的数据,并且将数据放入 Kuiper 数据处理流水线中。"
+			"en_US": "eKuiper provides built-in support for EdgeX source stream, which can subscribe the message from EdgeX message bus and feed into the eKuiper streaming process pipeline.",
+			"zh_CN": "eKuiper 提供了内置的 EdgeX 源支持,它可以被用来订阅来自于EdgeX 消息总线的数据,并且将数据放入 eKuiper 数据处理流水线中。"
 		}
 	},
 	"properties": {
@@ -36,12 +36,13 @@
 			},
 			{
 				"name": "protocol",
-				"default": "tcp",
+				"default": "redis",
 				"optional": true,
 				"connection_related": true,
 				"control": "select",
 				"values": [
-					"tcp"
+					"tcp",
+					"redis"
 				],
 				"type": "string",
 				"hint": {
@@ -102,14 +103,19 @@
 			},
 			{
 				"name": "type",
-				"default": "zero",
+				"default": "redis",
 				"optional": true,
-				"control": "text",
+				"control": "select",
 				"connection_related": true,
-				"type": "string",
+				"values": [
+					"mqtt",
+					"zero",
+					"redis"
+				],
+				"type": "list_string",
 				"hint": {
-					"en_US": "The EdgeX message bus type, currently two types of message buses are supported. If specified other values, then will use the default zero value.",
-					"zh_CN": "EdgeX 消息总线类型,目前支持两种消息总线。如果指定了错误的消息总线类型,那么会使用缺省 zero 类型。"
+					"en_US": "The EdgeX message bus type, currently two types of message buses are supported. If specified other values, then will use the default redis value.",
+					"zh_CN": "EdgeX 消息总线类型,目前支持两种消息总线。如果指定了错误的消息总线类型,那么会使用缺省 redis 类型。"
 				},
 				"label": {
 					"en_US": "Type",

+ 11 - 2
etc/sources/edgex.yaml

@@ -1,10 +1,10 @@
 #Global Edgex configurations
 default:
-  protocol: tcp
+  protocol: redis
   server: localhost
   port: 5563
   topic: events
-  type: zero
+  type: redis
   # Could be 'event' or 'request'.
   # If the message is from app service, the message type is an event;
   # Otherwise, if it is from the message bus directly, it should be a request
@@ -26,11 +26,20 @@ default:
 #    SkipCertVerify: true/false
 
 #Override the global configurations
+zmq_conf: #Conf_key
+  protocol: tcp
+  server: localhost
+  port: 5563
+  topic: events
+  type: zero
+  messageType: event
+
 application_conf: #Conf_key
   protocol: tcp
   server: localhost
   port: 5571
   topic: application
+  type: zero
   messageType: request
 
 mqtt_conf: #Conf_key

+ 66 - 0
etc/sources/file.json

@@ -0,0 +1,66 @@
+{
+  "about": {
+    "trial": true,
+    "author": {
+      "name": "EMQ",
+      "email": "contact@emqx.io",
+      "company": "EMQ Technologies Co., Ltd",
+      "website": "https://www.emqx.io"
+    },
+    "helpUrl": {
+      "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/rules/sources/file.md",
+      "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sources/file.md"
+    },
+    "description": {
+      "en_US": "Reading file content into the eKuiper processing pipeline. The file source is usually used as a table and it is the default type for create table statement.",
+      "zh_CN": "读取文件内容,并且将数据放入 eKuiper 数据处理流水线中。通常用于表格,且为使用 create table 语句时,默认的源类型。"
+    }
+  },
+  "libs": [],
+  "properties": {
+    "default": [
+      {
+        "name": "fileType",
+        "default": "json",
+        "optional": true,
+        "control": "text",
+        "type": "string",
+        "hint": {
+          "en_US": "The file format type.",
+          "zh_CN": "文件格式类型"
+        },
+        "label": {
+          "en_US": "File type",
+          "zh_CN": "文件类型"
+        }
+      },{
+        "name": "path",
+        "default": "",
+        "optional": false,
+        "control": "text",
+        "type": "string",
+        "hint": {
+          "en_US": "The directory of the file relative to eKuiper root or an absolute path. Do not include the file name here. The file name should be defined in the stream data source.",
+          "zh_CN": "文件所在文件夹的路径。请勿包含文件名,文件名应该在数据源中定义。"
+        },
+        "label": {
+          "en_US": "Path",
+          "zh_CN": "文件夹路径"
+        }
+      },{
+        "name": "interval",
+        "default": 0,
+        "optional": false,
+        "control": "text",
+        "type": "int",
+        "hint": {
+          "en_US": "The interval between reading the files, time unit is ms. If only read once, set it to 0",
+          "zh_CN": "读取文件的间隔时间。如果只需读取一次,设置为0。"
+        },
+        "label": {
+          "en_US": "Interval",
+          "zh_CN": "间隔时间"
+        }
+      }]
+  }
+}

+ 2 - 2
etc/sources/httppull.json

@@ -13,8 +13,8 @@
 			"zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sources/http_pull.md"
 		},
 		"description": {
-			"en_US": "Kuiper provides built-in support for pulling HTTP source stream, which can pull the message from HTTP server broker and feed into the Kuiper processing pipeline.",
-			"zh_CN": "Kuiper 为提取 HTTP 源流提供了内置支持,该支持可从 HTTP 服务器代理提取消息并输入 Kuiper 处理管道。"
+			"en_US": "eKuiper provides built-in support for pulling HTTP source stream, which can pull the message from HTTP server broker and feed into the eKuiper processing pipeline.",
+			"zh_CN": "eKuiper 为提取 HTTP 源流提供了内置支持,该支持可从 HTTP 服务器代理提取消息并输入 eKuiper 处理管道。"
 		}
 	},
 	"properties": {

+ 2 - 2
etc/sources/memory.json

@@ -8,8 +8,8 @@
       "website": "https://www.emqx.io"
     },
     "helpUrl": {
-      "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/plugins/sources/memory.md",
-      "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/plugins/sources/memory.md"
+      "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/rules/sources/memory.md",
+      "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sources/memory.md"
     },
     "description": {
       "en_US": "The source subscribes to topics to consume events from memory sink to form a rule pipeline.",

+ 1 - 1
etc/sources/zmq.json

@@ -13,7 +13,7 @@
     },
     "description": {
       "en_US": "The source will subscribe to a Zero Mq topic to import the messages into kuiper.",
-      "zh_CN": "源将订阅 Zero Mq 主题以将消息导入 kuiper。"
+      "zh_CN": "源将订阅 Zero Mq 主题以将消息导入 eKuiper。"
     }
   },
   "libs": [

+ 1 - 1
test/edgex_array_rule.jmx

@@ -114,7 +114,7 @@
                 <elementProp name="" elementType="HTTPArgument">
                   <boolProp name="HTTPArgument.always_encode">false</boolProp>
                   <stringProp name="Argument.value">{&#xd;
-&quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot;)&quot;&#xd;
+&quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot;,Conf_key=\&quot;zmq_conf\&quot;)&quot;&#xd;
 }</stringProp>
                   <stringProp name="Argument.metadata">=</stringProp>
                 </elementProp>

+ 1 - 1
test/edgex_sink_rule.jmx

@@ -109,7 +109,7 @@
                 <elementProp name="" elementType="HTTPArgument">
                   <boolProp name="HTTPArgument.always_encode">false</boolProp>
                   <stringProp name="Argument.value">{&#xd;
-&quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot;)&quot;&#xd;
+&quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot;,Conf_key=\&quot;zmq_conf\&quot;)&quot;&#xd;
 }</stringProp>
                   <stringProp name="Argument.metadata">=</stringProp>
                 </elementProp>

+ 1 - 1
test/select_edgex_condition_rule.jmx

@@ -114,7 +114,7 @@
                 <elementProp name="" elementType="HTTPArgument">
                   <boolProp name="HTTPArgument.always_encode">false</boolProp>
                   <stringProp name="Argument.value">{&#xd;
-&quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot;)&quot;&#xd;
+&quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot;,Conf_key=\&quot;zmq_conf\&quot;)&quot;&#xd;
 }</stringProp>
                   <stringProp name="Argument.metadata">=</stringProp>
                 </elementProp>

+ 1 - 1
test/select_edgex_meta_rule.jmx

@@ -114,7 +114,7 @@
                 <elementProp name="" elementType="HTTPArgument">
                   <boolProp name="HTTPArgument.always_encode">false</boolProp>
                   <stringProp name="Argument.value">{&#xd;
-&quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot;)&quot;&#xd;
+&quot;sql&quot; : &quot;create stream demo () WITH (FORMAT=\&quot;JSON\&quot;, TYPE=\&quot;edgex\&quot;,Conf_key=\&quot;zmq_conf\&quot;)&quot;&#xd;
 }</stringProp>
                   <stringProp name="Argument.metadata">=</stringProp>
                 </elementProp>