[英]JoltTransformJSON processor in NiFi
输入:
{ "table": [{
"_id": {
"personId": 1234,
"customer": 345,
"locale": "en"
}} ] }
需要以这种格式输出,我的Jolt Spec应该是什么
{
"table": [{
"personId": 1234,
"customer": 345,
"locale": "en"
}]
}
请尝试以下示例:
[
{
"operation": "shift",
"spec": {
"table": {
// table items
"*": {
// internal object in item under "_id" key
"*": "table[]"
}
}
}
}
]
我能够找到解决方案。
[
{
"operation": "shift",
"spec": {
"*": {
"*": {
"_id": {
"personId": "table[&2].personId",
"customer": "table[&2].customer",
"locale": "table[&2].locale"
}
}
}
}
}
]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.