Apache nifi 如何向AttributesToJSON添加自定义属性?

Apache nifi 如何向AttributesToJSON添加自定义属性?,apache-nifi,Apache Nifi,我有一个场景,其中文件列表来自前一个处理器,对于每个文件,我必须使用flowfile的属性创建json文件。在AttributesToJSON处理器配置中,有一个提取管道属性的选项,可以创建json文件/对象,如果我们将Include Core attributes设置为true,它将读取一些文件属性并形成json文件。 所以我的json文件应该是 { uuid:“文件uuid值”, filepath:“绝对路径+/+filename” } 获取上述json文件的任何输入。在传递到Attrib

我有一个场景,其中文件列表来自前一个处理器,对于每个文件,我必须使用flowfile的属性创建json文件。在AttributesToJSON处理器配置中,有一个提取管道属性的选项,可以创建json文件/对象,如果我们将Include Core attributes设置为true,它将读取一些文件属性并形成json文件。

所以我的json文件应该是

{ uuid:“文件uuid值”, filepath:“绝对路径+/+filename” }
获取上述json文件的任何输入。

在传递到
AttributestoJSON
之前,使用
UpdateAttribute
处理器删除不必要的属性,或者您也可以在
AttributestoJSON
处理器中指定所需的确切属性

the out for the above case in my scenario is …
{"fragment.size":"125"
file.group:"root",
file.lastModifiedTime:"2020-12-22T15:09:13+0000",
fragment.identifier:"ee5770ea-8406-400a-a2fd-2362bd706fe0",
fragment.index:"1",
file.creationTime:"2020-12-22T15:09:13+0000",
file.lastAccessTime:"2020-12-22T17:34:22+0000",
segment.original.filename:"Sample-Spreadsheet-10000-rows.csv",
file.owner:"root",
fragment.count:"2",
file.permissions:"rw-r--r--",
text.line.count:"1"}
}



 But the files has other properties, like absolute.path, filename, uuid  are missing in the above json file.
    My requirement is, get the absolute.path, filename and uuid and concatenate absolute.path+/+filename, assign this to custom attribute say filepath:absolute.path+/+filename and also add uuid to json object.