sql.json 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  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://ekuiper.org/docs/en/latest/guide/sources/plugin/sql.html",
  12. "zh_CN": "https://ekuiper.org/docs/zh/latest/guide/sources/plugin/sql.html"
  13. },
  14. "description": {
  15. "en_US": "Read message from sql database",
  16. "zh_CN": "从数据库中读取消息"
  17. }
  18. },
  19. "dataSource": {
  20. "default": "table1",
  21. "hint": {
  22. "en_US": "The SQL database to connect to, e.g. table1",
  23. "zh_CN": "将要连接的关系数据库表,例如 table1"
  24. },
  25. "label": {
  26. "en_US": "Data Source (Table)",
  27. "zh_CN": "数据源(表名)"
  28. }
  29. },
  30. "libs": [],
  31. "properties": {
  32. "default": [
  33. {
  34. "name": "url",
  35. "default": "",
  36. "optional": false,
  37. "control": "text",
  38. "type": "string",
  39. "hint": {
  40. "en_US": "The url of the database",
  41. "zh_CN": "数据库服务器的 URL"
  42. },
  43. "label": {
  44. "en_US": "Server address",
  45. "zh_CN": "数据库地址"
  46. }
  47. },
  48. {
  49. "name": "interval",
  50. "default": 1000,
  51. "optional": true,
  52. "control": "text",
  53. "type": "int",
  54. "hint": {
  55. "en_US": "The interval (ms) to issue a query",
  56. "zh_CN": "发出消息的间隔(毫秒)"
  57. },
  58. "label": {
  59. "en_US": "Interval",
  60. "zh_CN": "间隔时间"
  61. }
  62. },
  63. {
  64. "name": "lookup",
  65. "default": {
  66. "cache": {
  67. "name": "cache",
  68. "default": true,
  69. "optional": false,
  70. "control": "radio",
  71. "type": "bool",
  72. "hint": {
  73. "en_US": "Whether to enable cache for lookup",
  74. "zh_CN": "是否开启查询缓存"
  75. },
  76. "label": {
  77. "en_US": "Enable lookup cache",
  78. "zh_CN": "开启查询缓存"
  79. }
  80. },
  81. "cacheTtl": {
  82. "name": "cacheTtl",
  83. "default": 600,
  84. "optional": true,
  85. "control": "text",
  86. "type": "int",
  87. "hint": {
  88. "en_US": "Cache Time To Live",
  89. "zh_CN": "缓存时间"
  90. },
  91. "label": {
  92. "en_US": "Cache TTL",
  93. "zh_CN": "缓存时间"
  94. }
  95. },
  96. "cacheMissingKey": {
  97. "name": "cacheMissingKey",
  98. "default": true,
  99. "optional": false,
  100. "control": "radio",
  101. "type": "bool",
  102. "hint": {
  103. "en_US": "Whether to cache missing lookup of null value",
  104. "zh_CN": "是否缓存未命中的空值"
  105. },
  106. "label": {
  107. "en_US": "Cache missing key",
  108. "zh_CN": "缓存未命中的 Key"
  109. }
  110. }
  111. },
  112. "optional": true,
  113. "control": "list",
  114. "type": "object",
  115. "hint": {
  116. "en_US": "Lookup table configuration, only effective when using as a lookup table",
  117. "zh_CN": "查询表配置,仅在作为查询表使用时生效"
  118. },
  119. "label": {
  120. "en_US": "Lookup table configuration",
  121. "zh_CN": "查询表配置"
  122. }
  123. },
  124. {
  125. "name": "internalSqlQueryCfg",
  126. "default": {
  127. "table":{
  128. "name": "table",
  129. "default": "",
  130. "optional": true,
  131. "control": "text",
  132. "type": "string",
  133. "hint": {
  134. "en_US": "table name to query",
  135. "zh_CN": "指定查询的数据库表名"
  136. },
  137. "label": {
  138. "en_US": "Table Name",
  139. "zh_CN": "表名"
  140. }
  141. },
  142. "indexField": {
  143. "name": "indexField",
  144. "default": "",
  145. "optional": true,
  146. "control": "text",
  147. "type": "string",
  148. "hint": {
  149. "en_US": "index field",
  150. "zh_CN": "索引字段名"
  151. },
  152. "label": {
  153. "en_US": "Index Field",
  154. "zh_CN": "索引字段名"
  155. }
  156. },
  157. "indexValue": {
  158. "name": "indexValue",
  159. "default": "",
  160. "optional": true,
  161. "control": "text",
  162. "type": "string",
  163. "hint": {
  164. "en_US": "index init value",
  165. "zh_CN": "索引字段初始值"
  166. },
  167. "label": {
  168. "en_US": "Index init value",
  169. "zh_CN": "索引字段初始值"
  170. }
  171. },
  172. "limit": {
  173. "name": "limit",
  174. "default": "",
  175. "optional": true,
  176. "control": "text",
  177. "type": "int",
  178. "hint": {
  179. "en_US": "query result limit",
  180. "zh_CN": "查询结果条数限制"
  181. },
  182. "label": {
  183. "en_US": "Limit",
  184. "zh_CN": "查询条数限制"
  185. }
  186. },
  187. "indexFieldType": {
  188. "name": "indexFieldType",
  189. "default": "",
  190. "optional": true,
  191. "control": "select",
  192. "type": "string",
  193. "values": ["DATETIME", "INT", "FLOAT", "STRING"],
  194. "hint": {
  195. "en_US": "is the index datetime type",
  196. "zh_CN": "是否为时间格式"
  197. },
  198. "label": {
  199. "en_US": "Index Field Type",
  200. "zh_CN": "索引字段格式"
  201. }
  202. },
  203. "dateTimeFormat": {
  204. "name": "dateTimeFormat",
  205. "default": "",
  206. "optional": true,
  207. "control": "text",
  208. "type": "string",
  209. "hint": {
  210. "en_US": "dateTimeFormat",
  211. "zh_CN": "dateTimeFormat"
  212. },
  213. "label": {
  214. "en_US": "DateTime Format",
  215. "zh_CN": "时间格式"
  216. }
  217. }
  218. },
  219. "optional": true,
  220. "control": "list",
  221. "type": "object",
  222. "hint": {
  223. "en_US": "basic configuration for the query",
  224. "zh_CN": "查询基础配置"
  225. },
  226. "label": {
  227. "en_US": "Query Parameters",
  228. "zh_CN": "查询参数"
  229. }
  230. },
  231. {
  232. "name": "templateSqlQueryCfg",
  233. "default": {
  234. "TemplateSql": {
  235. "name": "TemplateSql",
  236. "default": "",
  237. "optional": true,
  238. "control": "text",
  239. "type": "string",
  240. "hint": {
  241. "en_US": "query template",
  242. "zh_CN": "查询语句模版"
  243. },
  244. "label": {
  245. "en_US": "Query template",
  246. "zh_CN": "查询语句模版"
  247. }
  248. },
  249. "indexField": {
  250. "name": "indexField",
  251. "default": "",
  252. "optional": true,
  253. "control": "text",
  254. "type": "string",
  255. "hint": {
  256. "en_US": "index field",
  257. "zh_CN": "索引字段名"
  258. },
  259. "label": {
  260. "en_US": "Index Field",
  261. "zh_CN": "索引字段名"
  262. }
  263. },
  264. "indexValue": {
  265. "name": "indexValue",
  266. "default": "",
  267. "optional": true,
  268. "control": "text",
  269. "type": "string",
  270. "hint": {
  271. "en_US": "index init value",
  272. "zh_CN": "索引字段初始值"
  273. },
  274. "label": {
  275. "en_US": "Index init value",
  276. "zh_CN": "索引字段初始值"
  277. }
  278. },
  279. "indexFieldType":{
  280. "name": "indexFieldType",
  281. "default": "",
  282. "optional": true,
  283. "control": "select",
  284. "type": "string",
  285. "values": ["DATETIME", "INT", "FLOAT", "STRING"],
  286. "hint": {
  287. "en_US": "is the index datetime type",
  288. "zh_CN": "是否为时间格式"
  289. },
  290. "label": {
  291. "en_US": "Index Field Type",
  292. "zh_CN": "索引字段格式"
  293. }
  294. },
  295. "dateTimeFormat": {
  296. "name": "dateTimeFormat",
  297. "default": "",
  298. "optional": true,
  299. "control": "text",
  300. "type": "string",
  301. "hint": {
  302. "en_US": "dateTimeFormat",
  303. "zh_CN": "dateTimeFormat"
  304. },
  305. "label": {
  306. "en_US": "DateTime Format",
  307. "zh_CN": "时间格式"
  308. }
  309. }
  310. },
  311. "optional": true,
  312. "control": "list",
  313. "type": "object",
  314. "hint": {
  315. "en_US": "Query Template",
  316. "zh_CN": "查询模版"
  317. },
  318. "label": {
  319. "en_US": "Query Template",
  320. "zh_CN": "查询模版"
  321. }
  322. }
  323. ]
  324. },
  325. "outputs": [
  326. {
  327. "label": {
  328. "en_US": "Output",
  329. "zh_CN": "输出"
  330. },
  331. "value": "signal"
  332. }
  333. ],
  334. "node": {
  335. "category": "source",
  336. "icon": "iconPath",
  337. "label": {
  338. "en_US": "SQL",
  339. "zh_CN": "SQL"
  340. }
  341. }
  342. }