问题描述
我有这样的 Json 数组;
[{"item_id": "","时间戳": "",类型": "",价值": ""},{"item_id": "","时间戳": "",类型": "",价值": ""}]我想像这样为 HBase 创建行键 :item_id 时间戳类型
但是 PutHBaseRecord 等待我的一个字段.我能做什么?
我可以这样做吗?
对于记录阅读器 = JsonPathReader
而且,rowId = concat($item_id, $timestamp, $type) ????
在PutHbaseRecord
之前使用UpdateRecord
处理器处理器.
定义记录读取器/写入器控制器服务以包含新添加的字段(row_id)
在 UpdateRecord 处理器中添加新属性
rowId连接(/item_id,/时间戳,/类型)
然后在 PutHBaseRecord 处理器中使用 rowId 代替 Row Identifier Field Name
属性值.
参考这个 配置/使用 UpdateRecord 处理器的链接
I have Json array like this;
[
{
"item_id": "",
"timestamp": "",
"type": "",
"value": ""
},
{
"item_id": "",
"timestamp": "",
"type": "",
"value": ""
}
]
I want to create row key for HBase as like this : item_id timestamp type
But PutHBaseRecord waits one field from me. What can I do?
Can I do something like that?
For record reader = JsonPathReader
And, rowId = concat($item_id, $timestamp, $type) ????
Use UpdateRecord
processor before PutHbaseRecord
processor.
Defines Record Reader/Writer controller services to include newly added field(row_id)
Add new property in UpdateRecord processor as
rowId
concat(/item_id, /timestamp, /type)
Then in PutHBaseRecord processor use the rowId in place of Row Identifier Field Name
property value.
Refer to this link for configure/usage of UpdateRecord processor
这篇关于Apache Nifi 中 PutHBaseRecord 中具有多个字段的行标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!