I am trying to get the count of files processed by ListHDFS, so the flow looks like this:
ListHDFS -> UpdateAttribute -> LogAttribute
I configured UpdateAttribute as per documentation (see attachment). Strangely, I am not even seeing "fileCount" in "view data provenance" option.
What am I missing?
I am able to see fileCount attribute value as 1 in data provenance,
I have recreated your scenario as
Generateflowfile --> UpdateAttribute --> LogAttribute
UpdateAttribute configs:
fileCount
${getStateValue("fileCount"):plus(1)}
Stateful Variables Initial Value 0
Initial value for the fileCount attribute is null(no value) and in UpdateAttribute we are adding one to the fileCount attribute and the new value is 1.