NIFI 如何将 uuid 更改为文件名 [英] NIFI how to change uuid to file name
问题描述
我有一些 XML 格式的文档加载到 Marklogic 中.PutMarkLogic URI 属性名称属性默认为uuid".如何将其更改为文件名.
I have some documents in XML format load into Marklogic. The PutMarkLogic URI attribute Name property default "uuid". How can I change it to file name.
输入目录:
/input/ac01010.xml
/input/ac02010.xml
....
我下面有两个处理器
GetFile ->PutMarkLogic
GetFile ->PutMarkLogic
想要 Marklogic 显示文档:
Want Marklogic display documents:
ac01010.xml
ac02010.xml
谢谢安迪和本.我已经更新了 Nifi 中的 UpdateAttribute 和 PutMarkLogic 属性.它有效.
Thanks Andy and Ben. I have updated UpdateAttribute and PutMarkLogic properties in Nifi. it works.
UpdateAttribute:已添加 ${filename}
UpdateAttribute:added ${filename}
PutMarkLogic 属性:
PutMarkLogic Property:
推荐答案
您可以使用 UpdateAttribute
处理器用 的值填充 filename 属性通过添加名称为 filename 和值为 ${uuid}
的动态属性来添加 uuid 属性.
You can use an UpdateAttribute
processor to populate the filename attribute with the value of the uuid attribute by adding a dynamic property with name filename and value ${uuid}
.
这篇关于NIFI 如何将 uuid 更改为文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!