Nifi LookupAttribute 处理器与 SimpleCsvFileLookupService 不起作用
我想使用 CSV 文件作为查找表来更新一些属性。
所以我认为 LookUpAttribute 处理器就是我所需要的。我将其配置为 SimpleCsvFileLookupService 作为查找服务,但我还无法让它工作。
我的 SimpleCsvFileLookupService 已配置,但仍处于“启用”状态,LookUpAttribute 处理器仍然告诉我它“无效,因为执行验证取决于引用当前禁用的控制器服务” ”。
我不明白为什么它不启用。有人用过这些组件吗?谢谢
编辑: 我没有看到左边的消息。它表示找不到“1”的映射(“1”被设置为查找键列,并且在 csv 中标题行为“1;2;3;4;5;6;7;8”。
什么是我找不到任何有关如何使用此控制器服务的说明
。 src="https://i.sstatic.net/f5sfe.png" alt="控制器服务警告">
I'd like to use a CSV file as a lookup table to update some attributes.
So I figured the LookUpAttribute processor was what I needed. I configured it with as SimpleCsvFileLookupService as the Lookup Service, but I can't get it to work yet.
My SimpleCsvFileLookupService is configured but stays in a "enabling" state, and the LookUpAttribute processor still tells me it's "invalid because performing validation depends on referencing a Controller Service that is currently disabled".
I dont understand why it doesn't enable. Has somebody used these components ? Thx
Edit :
I didn't see the message in the left. It says the mapping for "1" is not found ("1" is set as the lookup key column and in the csv the header row is "1;2;3;4;5;6;7;8".
What am I missing ? I can't find any explanation as to how to use this controller service.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的错误。根据 @tonykoval 的回答,我使用命令
hexdump -C
检查了 csv 文件的编码。该命令的结果以
00000000 ef bb bf
开头。ef bb bf
表示文件开头的 bom 字符。为了从文件中删除 bom,我使用 vivi
打开文件并运行命令:set nobomb
。我再次运行 hexdump 命令并验证我不再拥有 bom。然后我回到 nifi,禁用并再次启用我的 simpleCsvLookupService,现在它按预期进行了验证。
I was getting the same error. Based on @tonykoval 's answer I checked the encoding of my csv file using the command
hexdump -C <filename>
.The outcome of this command began with
00000000 ef bb bf
.ef bb bf
signifies a bom character at the beginning of the file. To remove the bom from the file, I opened the file with vivi <filename>
and ran the command:set nobomb
. I ran the hexdump command again and validated that I no longer had the bom.Then I went back to nifi, disabled and enabled again my simpleCsvLookupService and it now validated as expected.