Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Apache-Nifi - Problem with getStateValue

Highlighted

Apache-Nifi - Problem with getStateValue

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

Re: Apache-Nifi - Problem with getStateValue

Super 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.

Re: Apache-Nifi - Problem with getStateValue

Super 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.

Re: Apache-Nifi - Problem with getStateValue

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

Don't have an account?
Coming from Hortonworks? Activate your account here