Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Apache-Nifi - Problem with getStateValue

avatar

Hello, I'm storing the value of the file property, however, when I time retrieve it with the getStatevalue command in the UpdateAttribute processor the property appears empty. Please, what is the cause of this problem? Look at the attached image. Thank you!

95404-example.png

3 REPLIES 3

avatar
Master Guru
@Julio Gazeta

The reason for not getting the state value is in UpdateAttribute processor you have selected Store State property value as "Do not store state" in this case processor doesn't get the state value.

To resolve this issue:
Change the UpdateAttribute processor configs to

Store State

Store state locally

Then auto terminate (or) connect set state fail connection to get notified in case of an failures happend.

Try to run and check are you able to get the state value or not.

-

If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.

avatar
Master Guru
@Julio Gazeta

Weird, i'm able to get the state value if i keep store state locally.

Regards to GetMongo processor the flowfile attributes issue got resolved in NiFi-1.8 NIFI-5334 addressing this issue.

As a word around to get required attribute refer to this link.

avatar

Shu, I did the way you suggested and yet the value comes empty. I need to save the value of a property at the beginning of my stream to reuse it in my ReplaceText processor according to the attached image. After GetMongo I lose this property. Please, what is the best way to perform this procedure in NIFI?

95411-example.png