最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Does Apache NiFi's ExtractText processor always add a .0 suffix to the resulting attribute, even when there is only one

programmeradmin0浏览0评论

In NiFi, I have a flow file that contains the following text:

"description":"2025 : Source file is: [28793789, 23798840, 12909830, 12960083, 38070832]"},

After that flow file is received, i have an ExtractText processor that uses a regex that attempts to extract only the list of numbers, including the brackets:

(?<=Source file is: )[\d.*?]

In ExtractText, this regex is added under a property named "dimensions".

Once the flow file passes through this ExtractText processor, an attribute value is added to the flow file with the extracted numbers:

dimensions.0 [28793789, 23798840, 12909830, 12960083, 38070832]

It always contains a suffix of .0, indicating the first capture group.

is there a way i can just get the attribute to appear as dimensions instead of dimensions.0?

I would prefer not to add an additional UpdateAttribute processor and keep everything in the one ExtractText processor if possible.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论