sql.json 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. {
  2. "about": {
  3. "trial": true,
  4. "author": {
  5. "name": "EMQ",
  6. "email": "contact@emqx.io",
  7. "company": "EMQ Technologies Co., Ltd",
  8. "website": "https://www.emqx.io"
  9. },
  10. "helpUrl": {
  11. "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/rules/sources/plugin/sql.md",
  12. "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sources/plugin/sql.md"
  13. },
  14. "description": {
  15. "en_US": "Read message from sql database",
  16. "zh_CN": "从数据库中读取消息"
  17. }
  18. },
  19. "libs": [],
  20. "properties": {
  21. "default": [
  22. {
  23. "name": "url",
  24. "default": "",
  25. "optional": false,
  26. "control": "text",
  27. "type": "string",
  28. "hint": {
  29. "en_US": "The url of the database",
  30. "zh_CN": "数据库服务器的 URL"
  31. },
  32. "label": {
  33. "en_US": "server address",
  34. "zh_CN": "数据库地址"
  35. }
  36. },
  37. {
  38. "name": "interval",
  39. "default": 1000,
  40. "optional": false,
  41. "control": "text",
  42. "type": "int",
  43. "hint": {
  44. "en_US": "The interval (ms) to issue a query",
  45. "zh_CN": "发出消息的间隔(毫秒)"
  46. },
  47. "label": {
  48. "en_US": "Interval",
  49. "zh_CN": "间隔时间"
  50. }
  51. },
  52. {
  53. "name": "internalSqlQueryCfg",
  54. "default": [
  55. {
  56. "name": "table",
  57. "default": "tableName",
  58. "optional": false,
  59. "control": "text",
  60. "type": "string",
  61. "hint": {
  62. "en_US": "table name to query",
  63. "zh_CN": "指定查询的数据库表名"
  64. },
  65. "label": {
  66. "en_US": "tableName",
  67. "zh_CN": "表名"
  68. }
  69. },
  70. {
  71. "name": "indexField",
  72. "default": "",
  73. "optional": true,
  74. "control": "text",
  75. "type": "string",
  76. "hint": {
  77. "en_US": "index field",
  78. "zh_CN": "索引字段名"
  79. },
  80. "label": {
  81. "en_US": "indexField",
  82. "zh_CN": "索引字段名"
  83. }
  84. },
  85. {
  86. "name": "indexValue",
  87. "default": "",
  88. "optional": true,
  89. "control": "text",
  90. "type": "string",
  91. "hint": {
  92. "en_US": "index init value",
  93. "zh_CN": "索引字段初始值"
  94. },
  95. "label": {
  96. "en_US": "index init value",
  97. "zh_CN": "索引字段初始值"
  98. }
  99. },
  100. {
  101. "name": "limit",
  102. "default": 10,
  103. "optional": true,
  104. "control": "text",
  105. "type": "int",
  106. "hint": {
  107. "en_US": "query result limit",
  108. "zh_CN": "查询结果条数限制"
  109. },
  110. "label": {
  111. "en_US": "Limit",
  112. "zh_CN": "查询条数限制"
  113. }
  114. },
  115. {
  116. "name": "indexFieldType",
  117. "default": "",
  118. "optional": true,
  119. "control": "select",
  120. "type": "string",
  121. "values": ["DATETIME"],
  122. "hint": {
  123. "en_US": "is the index datetime type",
  124. "zh_CN": "是否为时间格式"
  125. },
  126. "label": {
  127. "en_US": "indexFieldType",
  128. "zh_CN": "indexFieldType"
  129. }
  130. },
  131. {
  132. "name": "dateTimeFormat",
  133. "default": "",
  134. "optional": true,
  135. "control": "text",
  136. "type": "string",
  137. "hint": {
  138. "en_US": "dateTimeFormat",
  139. "zh_CN": "dateTimeFormat"
  140. },
  141. "label": {
  142. "en_US": "dateTimeFormat",
  143. "zh_CN": "dateTimeFormat"
  144. }
  145. }
  146. ],
  147. "optional": true,
  148. "control": "list",
  149. "type": "list_object",
  150. "hint": {
  151. "en_US": "basic configuration for the query",
  152. "zh_CN": "查询基础配置"
  153. },
  154. "label": {
  155. "en_US": "Query Parameters",
  156. "zh_CN": "查询参数"
  157. }
  158. },
  159. {
  160. "name": "templateSqlQueryCfg",
  161. "default": [
  162. {
  163. "name": "TemplateSql",
  164. "default": "",
  165. "optional": false,
  166. "control": "text",
  167. "type": "string",
  168. "hint": {
  169. "en_US": "query template",
  170. "zh_CN": "查询语句模版"
  171. },
  172. "label": {
  173. "en_US": "query template",
  174. "zh_CN": "查询语句模版"
  175. }
  176. },
  177. {
  178. "name": "indexField",
  179. "default": "",
  180. "optional": true,
  181. "control": "text",
  182. "type": "string",
  183. "hint": {
  184. "en_US": "index field",
  185. "zh_CN": "索引字段名"
  186. },
  187. "label": {
  188. "en_US": "indexField",
  189. "zh_CN": "索引字段名"
  190. }
  191. },
  192. {
  193. "name": "indexValue",
  194. "default": "",
  195. "optional": true,
  196. "control": "text",
  197. "type": "string",
  198. "hint": {
  199. "en_US": "index init value",
  200. "zh_CN": "索引字段初始值"
  201. },
  202. "label": {
  203. "en_US": "index init value",
  204. "zh_CN": "索引字段初始值"
  205. }
  206. },
  207. {
  208. "name": "indexFieldType",
  209. "default": "",
  210. "optional": true,
  211. "control": "select",
  212. "type": "string",
  213. "values": ["DATETIME"],
  214. "hint": {
  215. "en_US": "is the index datetime type",
  216. "zh_CN": "是否为时间格式"
  217. },
  218. "label": {
  219. "en_US": "indexFieldType",
  220. "zh_CN": "indexFieldType"
  221. }
  222. },
  223. {
  224. "name": "dateTimeFormat",
  225. "default": "",
  226. "optional": true,
  227. "control": "text",
  228. "type": "string",
  229. "hint": {
  230. "en_US": "dateTimeFormat",
  231. "zh_CN": "dateTimeFormat"
  232. },
  233. "label": {
  234. "en_US": "dateTimeFormat",
  235. "zh_CN": "dateTimeFormat"
  236. }
  237. }
  238. ],
  239. "optional": true,
  240. "control": "list",
  241. "type": "list_object",
  242. "hint": {
  243. "en_US": "Query Template",
  244. "zh_CN": "查询模版"
  245. },
  246. "label": {
  247. "en_US": "Query Template",
  248. "zh_CN": "查询模版"
  249. }
  250. }
  251. ]
  252. }
  253. }