file.json 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. {
  2. "about": {
  3. "trial": false,
  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/sinks/builtin/file.html",
  12. "zh_CN": "https://ekuiper.org/docs/zh/latest/guide/sinks/builtin/file.html"
  13. },
  14. "description": {
  15. "en_US": "This a sink plugin for file, it can be used for saving the analysis data into file system.",
  16. "zh_CN": "本插件为文件持久化插件,可以用于将分析数据存入指定的文件中。"
  17. }
  18. },
  19. "libs": [
  20. ],
  21. "properties": [
  22. {
  23. "name": "path",
  24. "default": "",
  25. "optional": false,
  26. "control": "text",
  27. "type": "string",
  28. "hint": {
  29. "en_US": "The file path for saving the result, could be dynamic like {{.field}}.txt",
  30. "zh_CN": "保存结果的文件路径,可为动态路径,例如 {{.field}}.txt"
  31. },
  32. "label": {
  33. "en_US": "Path of file",
  34. "zh_CN": "文件路径"
  35. }
  36. }, {
  37. "name": "fileType",
  38. "default": "lines",
  39. "optional": true,
  40. "control": "select",
  41. "type": "string",
  42. "values": [
  43. "lines",
  44. "json",
  45. "csv"
  46. ],
  47. "hint": {
  48. "en_US": "The file format type.",
  49. "zh_CN": "文件格式类型"
  50. },
  51. "label": {
  52. "en_US": "File type",
  53. "zh_CN": "文件类型"
  54. }
  55. }, {
  56. "name": "hasHeader",
  57. "default": false,
  58. "optional": true,
  59. "control": "radio",
  60. "type": "bool",
  61. "hint": {
  62. "en_US": "Whether to produce header, usually used for csv file.",
  63. "zh_CN": "是否写入文件头,多用于 csv 文件"
  64. },
  65. "label": {
  66. "en_US": "Has header",
  67. "zh_CN": "是否包含文件头"
  68. }
  69. }, {
  70. "name": "rollingInterval",
  71. "default": "",
  72. "optional": true,
  73. "control": "text",
  74. "type": "int",
  75. "hint": {
  76. "en_US": "The interval in millisecond for checking time based rolling policies. This controls the frequency to check whether a part file should rollover.",
  77. "zh_CN": "滚动到新文件的最小时间间隔(以毫秒为单位)。检查频率由checkInterval 控制。"
  78. },
  79. "label": {
  80. "en_US": "Rolling Interval",
  81. "zh_CN": "Rolling 间隔"
  82. }
  83. }, {
  84. "name": "checkInterval",
  85. "default": "",
  86. "optional": true,
  87. "control": "text",
  88. "type": "int",
  89. "hint": {
  90. "en_US": "The minimum time interval in milliseconde to roll to a new file. The frequency at which this is checked is controlled by the checkInterval. ",
  91. "zh_CN": "检查基于时间的滚动策略的间隔(以毫秒为单位),用于控制检查文件是否应该翻转的频率。"
  92. },
  93. "label": {
  94. "en_US": "Check Interval",
  95. "zh_CN": "检查间隔"
  96. }
  97. }, {
  98. "name": "rollingCount",
  99. "default": "10000",
  100. "optional": true,
  101. "control": "text",
  102. "type": "int",
  103. "hint": {
  104. "en_US": "The maximum message counts in a file before rollover.",
  105. "zh_CN": "文件翻转前的最大消息计数。"
  106. },
  107. "label": {
  108. "en_US": "Rolling Count",
  109. "zh_CN": "Rolling 计数"
  110. }
  111. }, {
  112. "name": "rollingNamePattern",
  113. "default": "",
  114. "optional": true,
  115. "control": "select",
  116. "type": "string",
  117. "values": [
  118. "prefix",
  119. "suffix",
  120. "none"
  121. ],
  122. "hint": {
  123. "en_US": "Define how to named the rolling files by specifying where to put the timestamp during file creation. The value could be \"prefix\", \"suffix\" or \"none\".",
  124. "zh_CN": "指定滚动文件创建时如何放置时间戳。时间戳可为“前缀”,“后缀”或“无”。"
  125. },
  126. "label": {
  127. "en_US": "Rolling Name Pattern",
  128. "zh_CN": "Rolling 文件名模式"
  129. }
  130. }],
  131. "node": {
  132. "category": "sink",
  133. "icon": "iconPath",
  134. "label": {
  135. "en": "File",
  136. "zh": "文件"
  137. }
  138. }
  139. }