Nifi Jolt 复制一个属性
Nifi Jolt duplicate an attribute
我是 Jolt 的新手,我需要两个名称不同但值相同的字段来自输入 JSON。
输入:
{
"date": 15746555589,
"sensorid": "23r098hd20c8jd02hd0h02300000000000"
}
期望的输出:
{
"lastseen": 15746555589,
"firstseen": 15746555589,
"sensorid": "23r098hd20c8jd02hd0h02300000000000"
}
这个规范应该有效:
[
{
"operation": "shift",
"spec": {
"date": "lastseen",
"@(1,date)": "firstseen",
"*": "&"
}
}
]
我是 Jolt 的新手,我需要两个名称不同但值相同的字段来自输入 JSON。
输入:
{
"date": 15746555589,
"sensorid": "23r098hd20c8jd02hd0h02300000000000"
}
期望的输出:
{
"lastseen": 15746555589,
"firstseen": 15746555589,
"sensorid": "23r098hd20c8jd02hd0h02300000000000"
}
这个规范应该有效:
[
{
"operation": "shift",
"spec": {
"date": "lastseen",
"@(1,date)": "firstseen",
"*": "&"
}
}
]