I have a use case where I need to append a row number to every record in a flow file. Not everything I receive is text so the only guarantee I have is that I have a record reader for each type of file. I started out looking at the row_number window function in QueryRecord but after looking at things for the past few days that isn’t going to work since Calcite requires everything to be in memory to execute the window function.
So I’m looking for another approach that can take advantage of the record api. It seems like it would be possible to write a counter function for UpdateRecord but I don’t know enough about the api to know if there is a context maintained throughout a given flow file to stash the variable in. Thanks Shawn Weeks