1

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.

enter image description here

What am I missing?

Community
  • 1
  • 1
Rakesh Prasad
  • 602
  • 1
  • 13
  • 32

1 Answers1

2

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

Provenance for the file: enter image description here

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.

Community
  • 1
  • 1
notNull
  • 30,258
  • 4
  • 35
  • 50