Nifi LookupAttribute 处理器与 SimpleCsvFileLookupService 不起作用

发布于 2025-01-14 03:02:05 字数 1273 浏览 4 评论 0原文

我想使用 CSV 文件作为查找表来更新一些属性。

所以我认为 LookUpAttribute 处理器就是我所需要的。我将其配置为 SimpleCsvFileLookupService 作为查找服务,但我还无法让它工作。

我的 SimpleCsvFileLookupService 已配置,但仍处于“启用”状态,LookUpAttribute 处理器仍然告诉我它“无效,因为执行验证取决于引用当前禁用的控制器服务” ”。

我不明白为什么它不启用。有人用过这些组件吗?谢谢

Dataflow LookAttribute 属性控制器服务

编辑: 我没有看到左边的消息。它表示找不到“1”的映射(“1”被设置为查找键列,并且在 csv 中标题行为“1;2;3;4;5;6;7;8”。

什么是我找不到任何有关如何使用此控制器服务的说明

。 src="https://i.sstatic.net/f5sfe.png" alt="控制器服务警告">

Edit2 :SimpleCsvFileLookupService 属性 SimpleCsvFileLookupService 属性

Edit3:csv 文件的摘录 csv 文件

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

Dataflow
LookAttribute properties
Controller services

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.

Controller service warning

Edit2 : The SimpleCsvFileLookupService properties
SimpleCsvFileLookupService properties

Edit3 : Extract of the csv file
csv file

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨洒年华 2025-01-21 03:02:05

我遇到了同样的错误。根据 @tonykoval 的回答,我使用命令 hexdump -C 检查了 csv 文件的编码。

该命令的结果以 00000000 ef bb bf 开头。 ef bb bf 表示文件开头的 bom 字符。为了从文件中删除 bom,我使用 vi vi 打开文件并运行命令 :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 vi vi <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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文