{"size": 6348, "ext": "js", "max_stars_repo_path": "assets/js/44.f028bb5d.js", "max_stars_repo_name": "nifichina/nifichina.gitee.io", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/js/44.f028bb5d.js", "max_issues_repo_name": "nifichina/nifichina.gitee.io", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/44.f028bb5d.js", "max_forks_repo_name": "nifichina/nifichina.gitee.io", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 6348.0, "max_line_length": 6348, "alphanum_fraction": 0.5748267171}
(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{411:function(t,r,e){"use strict";e.r(r);var v=e(25),_=Object(v.a)({},(function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"jolttransformrecord"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#jolttransformrecord"}},[t._v("#")]),t._v(" JoltTransformRecord")]),t._v(" "),e("hr"),t._v(" "),e("p",[t._v("编辑人(全网同名)："),e("strong",[e("strong",[t._v("酷酷的诚")])]),t._v("  邮箱："),e("strong",[t._v("zhangchengk@foxmail.com")])]),t._v(" "),e("hr"),t._v(" "),e("h2",{attrs:{id:"描述"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#描述"}},[t._v("#")]),t._v(" 描述")]),t._v(" "),e("p",[t._v("与JoltTransformJSON使用方法一样，只是添加了输入格式和输出格式策略，都是使用Jolt转换json,成功的路由到'success',失败的'failure'。处理JSON的实用程序不是基于流的，因此大型JSON文档转换可能会消耗大量内存。目前支持UTF-8流文件内容和Jolt Spec。可以使用表达式语言定义Spec，其中可以在Spec语法的左侧或右侧引用属性。支持自定义转换(实现转换接口)。包含当前类路径上不存在的自定义库的模块可以通过自定义模块目录属性包含。注意:在配置处理器时，如果用户选择了默认的转换，但仍然提供了一个链Spec，那么系统不会警告该Spec是无效的，并且会产生失败的流文件。这是确定的一个已知问题。")]),t._v(" "),e("h2",{attrs:{id:"属性配置"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#属性配置"}},[t._v("#")]),t._v(" 属性配置")]),t._v(" "),e("p",[t._v("在下面的列表中，必需属性的名称以粗体显示。任何其他属性(不是粗体)都被认为是可选的，并且指出属性默认值（如果有默认值），以及属性是否支持表达式语言。")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("属性名称")]),t._v(" "),e("th",{staticStyle:{"text-align":"right"}},[t._v("默认值")]),t._v(" "),e("th",[t._v("可选值")]),t._v(" "),e("th",[t._v("描述")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[e("strong",[t._v("Record Reader")])]),t._v(" "),e("td",{staticStyle:{"text-align":"right"}}),t._v(" "),e("td",[t._v("Controller Service API:"),e("br"),t._v("RecordReaderFactory"),e("br"),t._v("Implementations: "),e("br"),t._v("Syslog5424Reader"),e("br"),t._v("GrokReader"),e("br"),t._v("JsonTreeReader"),e("br"),t._v("ScriptedReader"),e("br"),t._v("XMLReader"),e("br"),t._v("AvroReader"),e("br"),t._v("SyslogReader"),e("br"),t._v("CSVReader"),e("br"),t._v("JsonPathReader")]),t._v(" "),e("td",[t._v("指定用于解析传入数据和确定数据模式的控制器服务。")])]),t._v(" "),e("tr",[e("td",[e("strong",[t._v("Record Writer")])]),t._v(" "),e("td",{staticStyle:{"text-align":"right"}}),t._v(" "),e("td",[t._v("Controller Service API:"),e("br"),t._v("RecordSetWriterFactory"),e("br"),t._v("Implementations: "),e("br"),t._v("CSVRecordSetWriter"),e("br"),t._v("AvroRecordSetWriter"),e("br"),t._v("ScriptedRecordSetWriter"),e("br"),t._v("XMLRecordSetWriter"),e("br"),t._v("FreeFormTextRecordSetWriter"),e("br"),t._v("JsonRecordSetWriter")]),t._v(" "),e("td",[t._v("指定用于解析输出数据和确定数据模式的控制器服务。")])]),t._v(" "),e("tr",[e("td",[e("strong",[t._v("Jolt Transformation DSL")])]),t._v(" "),e("td",{staticStyle:{"text-align":"right"}},[t._v("jolt-transform-chain")]),t._v(" "),e("td",[t._v("Cardinality "),e("br"),t._v("Chain"),e("br"),t._v("Default"),e("br"),t._v("Modify -Default"),e("br"),t._v("Modify - Define"),e("br"),t._v("Modify - Overwrite"),e("br"),t._v("Remove"),e("br"),t._v("Shift"),e("br"),t._v("Sort"),e("br"),t._v("Custom")]),t._v(" "),e("td",[t._v("指定应该使用哪种Jolt转换模式")])]),t._v(" "),e("tr",[e("td",[t._v("Custom Transformation Class Name")]),t._v(" "),e("td",{staticStyle:{"text-align":"right"}}),t._v(" "),e("td"),t._v(" "),e("td",[t._v("自定义Jolt转换工具类的全类名")])]),t._v(" "),e("tr",[e("td",[t._v("Custom Module Directory")]),t._v(" "),e("td",{staticStyle:{"text-align":"right"}}),t._v(" "),e("td"),t._v(" "),e("td",[t._v("文件和/或目录的路径列表，其中包含包含自定义转换的模块(不包括在NiFi的类路径中)。")])]),t._v(" "),e("tr",[e("td",[t._v("Jolt Specification")]),t._v(" "),e("td",{staticStyle:{"text-align":"right"}}),t._v(" "),e("td"),t._v(" "),e("td",[t._v("JSON数据转换Spec。如果选择了Sort转换，则忽略此值。"),e("br"),t._v("支持表达式语言:true(将使用流文件属性和变量注册表进行计算)")])]),t._v(" "),e("tr",[e("td",[e("strong",[t._v("Transform Cache Size")])]),t._v(" "),e("td",{staticStyle:{"text-align":"right"}},[t._v("1")]),t._v(" "),e("td"),t._v(" "),e("td",[t._v("编译一个震荡转换可能相当昂贵。理想情况下，这只会做一次。但是，如果在转换中使用了表达式语言，我们可能需要为每个流文件进行新的转换。这个值控制我们在内存中缓存多少个转换，以避免每次编译转换。")])]),t._v(" "),e("tr",[e("td",[e("strong",[t._v("Include Schema")])]),t._v(" "),e("td",{staticStyle:{"text-align":"right"}},[t._v("false")]),t._v(" "),e("td",[t._v("true"),e("br"),t._v("false")]),t._v(" "),e("td",[t._v("如果为true，美化输出json的格式。")])])])]),t._v(" "),e("h2",{attrs:{id:"连接关系"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#连接关系"}},[t._v("#")]),t._v(" 连接关系")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("名称")]),t._v(" "),e("th",[t._v("描述")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("success")]),t._v(" "),e("td",[t._v("成功地转换json")])]),t._v(" "),e("tr",[e("td",[t._v("failure")]),t._v(" "),e("td",[t._v("未成功地转换json")])])])]),t._v(" "),e("p",[t._v("读取属性:")]),t._v(" "),e("p",[t._v("没有指定。")]),t._v(" "),e("h2",{attrs:{id:"写属性"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#写属性"}},[t._v("#")]),t._v(" 写属性")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Name")]),t._v(" "),e("th",[t._v("Description")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("mime.type")]),t._v(" "),e("td",[t._v("application/json")])])])]),t._v(" "),e("h2",{attrs:{id:"状态管理"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#状态管理"}},[t._v("#")]),t._v(" 状态管理")]),t._v(" "),e("p",[t._v("此组件不存储状态。")]),t._v(" "),e("h2",{attrs:{id:"限制"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#限制"}},[t._v("#")]),t._v(" 限制")]),t._v(" "),e("p",[t._v("此组件不受限制。")]),t._v(" "),e("h2",{attrs:{id:"输入要求"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#输入要求"}},[t._v("#")]),t._v(" 输入要求")]),t._v(" "),e("p",[t._v("此组件需要传入连接关系。")]),t._v(" "),e("h2",{attrs:{id:"系统资源方面的考虑"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#系统资源方面的考虑"}},[t._v("#")]),t._v(" 系统资源方面的考虑")]),t._v(" "),e("p",[t._v("没有指定。")]),t._v(" "),e("h2",{attrs:{id:"应用场景"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#应用场景"}},[t._v("#")]),t._v(" 应用场景")]),t._v(" "),e("p",[t._v("该组件使用开源JOLT库来实现批量JSON转换，JOLT目前是一个不基于流式的非常高效的json转换库，JOLT有自己定义的一套DSL。使用该组件需要先了解JOLT的知识，并编写出相应的JOLT规范。这里不做具体示例，可以直接参看"),e("RouterLink",{attrs:{to:"/extend/jolt详解.html"}},[t._v("JOLT教程")]),t._v("。")],1),t._v(" "),e("h2",{attrs:{id:"公众号"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#公众号"}},[t._v("#")]),t._v(" 公众号")]),t._v(" "),e("p",[t._v("关注公众号 得到第一手文章/文档更新推送。")]),t._v(" "),e("p",[e("img",{attrs:{src:"https://nifichina.gitee.io/image/donate/wechat.jpg",alt:""}})])])}),[],!1,null,null,null);r.default=_.exports}}]);