【发布时间】:2020-12-18 19:58:57
【问题描述】:
我正在尝试连接两个字符串。由于字符串名称包含.,因此不会在 concat 表达式中读取该特定字段。
json 输入:
{
"properties": [
{
"test.flu": "flu1",
"reportId": 11
},
{
"test.flu": "flu2",
"reportId": 12
}
],
"type": "node",
"labels": "label1"
}
颠簸规格:
[
{
"operation": "modify-default-beta",
"spec": {
"properties": {
"*": {
"id": "=concat(@(1,test.flu),' ',@(1,reportId))"
}
}
}
}
]
输出:
{
"properties": [
{
"test.flu": "flu1",
"reportId": 11,
"id": " 11" // expected output: "flu1 11"
},
{
"test.flu": "flu2",
"reportId": 12,
"id": " 12"
}
],
"type": "node",
"labels": "label1"
}
因为我的连接字符串有一个句点,所以它没有读取那个字符串。我相信这将是非常小的修复。期待一些帮助。
【问题讨论】:
标签: json concatenation apache-nifi jolt