{ "about": { "trial": true, "author": { "name": "EMQ", "email": "contact@emqx.io", "company": "EMQ Technologies Co., Ltd", "website": "https://www.emqx.io" }, "helpUrl": { "en_US": "https://ekuiper.org/docs/en/latest/guide/sources/plugin/sql.html", "zh_CN": "https://ekuiper.org/docs/zh/latest/guide/sources/plugin/sql.html" }, "description": { "en_US": "Read message from sql database", "zh_CN": "从数据库中读取消息" } }, "dataSource": { "default": "table1", "hint": { "en_US": "The SQL database to connect to, e.g. table1", "zh_CN": "将要连接的关系数据库表,例如 table1" }, "label": { "en_US": "Data Source (Table)", "zh_CN": "数据源(表名)" } }, "libs": [], "properties": { "default": [ { "name": "url", "default": "", "optional": false, "control": "text", "type": "string", "hint": { "en_US": "The url of the database", "zh_CN": "数据库服务器的 URL" }, "label": { "en_US": "Server address", "zh_CN": "数据库地址" } }, { "name": "interval", "default": 1000, "optional": true, "control": "text", "type": "int", "hint": { "en_US": "The interval (ms) to issue a query", "zh_CN": "发出消息的间隔(毫秒)" }, "label": { "en_US": "Interval", "zh_CN": "间隔时间" } }, { "name": "internalSqlQueryCfg", "default": [ { "name": "table", "default": "tableName", "optional": false, "control": "text", "type": "string", "hint": { "en_US": "table name to query", "zh_CN": "指定查询的数据库表名" }, "label": { "en_US": "Table Name", "zh_CN": "表名" } }, { "name": "indexField", "default": "", "optional": true, "control": "text", "type": "string", "hint": { "en_US": "index field", "zh_CN": "索引字段名" }, "label": { "en_US": "Index Field", "zh_CN": "索引字段名" } }, { "name": "indexValue", "default": "", "optional": true, "control": "text", "type": "string", "hint": { "en_US": "index init value", "zh_CN": "索引字段初始值" }, "label": { "en_US": "Index init value", "zh_CN": "索引字段初始值" } }, { "name": "limit", "default": 10, "optional": true, "control": "text", "type": "int", "hint": { "en_US": "query result limit", "zh_CN": "查询结果条数限制" }, "label": { "en_US": "Limit", "zh_CN": "查询条数限制" } }, { "name": "indexFieldType", "default": "", "optional": true, "control": "select", "type": "string", "values": ["DATETIME", "INT", "FLOAT", "STRING"], "hint": { "en_US": "is the index datetime type", "zh_CN": "是否为时间格式" }, "label": { "en_US": "Index Field Type", "zh_CN": "索引字段格式" } }, { "name": "dateTimeFormat", "default": "", "optional": true, "control": "text", "type": "string", "hint": { "en_US": "dateTimeFormat", "zh_CN": "dateTimeFormat" }, "label": { "en_US": "DateTime Format", "zh_CN": "时间格式" } } ], "optional": true, "control": "list", "type": "list_object", "hint": { "en_US": "basic configuration for the query", "zh_CN": "查询基础配置" }, "label": { "en_US": "Query Parameters", "zh_CN": "查询参数" } }, { "name": "templateSqlQueryCfg", "default": [ { "name": "TemplateSql", "default": "", "optional": false, "control": "text", "type": "string", "hint": { "en_US": "query template", "zh_CN": "查询语句模版" }, "label": { "en_US": "Query template", "zh_CN": "查询语句模版" } }, { "name": "indexField", "default": "", "optional": true, "control": "text", "type": "string", "hint": { "en_US": "index field", "zh_CN": "索引字段名" }, "label": { "en_US": "Index Field", "zh_CN": "索引字段名" } }, { "name": "indexValue", "default": "", "optional": true, "control": "text", "type": "string", "hint": { "en_US": "index init value", "zh_CN": "索引字段初始值" }, "label": { "en_US": "Index init value", "zh_CN": "索引字段初始值" } }, { "name": "indexFieldType", "default": "", "optional": true, "control": "select", "type": "string", "values": ["DATETIME", "INT", "FLOAT", "STRING"], "hint": { "en_US": "is the index datetime type", "zh_CN": "是否为时间格式" }, "label": { "en_US": "Index Field Type", "zh_CN": "索引字段格式" } }, { "name": "dateTimeFormat", "default": "", "optional": true, "control": "text", "type": "string", "hint": { "en_US": "dateTimeFormat", "zh_CN": "dateTimeFormat" }, "label": { "en_US": "DateTime Format", "zh_CN": "时间格式" } } ], "optional": true, "control": "list", "type": "list_object", "hint": { "en_US": "Query Template", "zh_CN": "查询模版" }, "label": { "en_US": "Query Template", "zh_CN": "查询模版" } }, { "name": "lookup", "default": [ { "name": "cache", "default": true, "optional": false, "control": "radio", "type": "bool", "hint": { "en_US": "Whether to enable cache for lookup", "zh_CN": "是否开启查询缓存" }, "label": { "en_US": "Enable lookup cache", "zh_CN": "开启查询缓存" } }, { "name": "cacheTtl", "default": "600", "optional": true, "control": "text", "type": "string", "hint": { "en_US": "Cache Time To Live", "zh_CN": "缓存时间" }, "label": { "en_US": "Cache TTL", "zh_CN": "缓存时间" } }, { "name": "cacheMissingKey", "default": true, "optional": false, "control": "radio", "type": "bool", "hint": { "en_US": "Whether to cache missing lookup of null value", "zh_CN": "是否缓存未命中的空值" }, "label": { "en_US": "Cache missing key", "zh_CN": "缓存未命中的 Key" } } ], "optional": true, "control": "list", "type": "list_object", "hint": { "en_US": "Lookup table configuration, only effective when using as a lookup table", "zh_CN": "查询表配置,仅在作为查询表使用时生效" }, "label": { "en_US": "Lookup table configuration", "zh_CN": "查询表配置" } } ] }, "outputs": [ { "label": { "en_US": "Output", "zh_CN": "输出" }, "value": "signal" } ], "node": { "category": "source", "icon": "iconPath", "label": { "en_US": "SQL", "zh_CN": "SQL" } } }