I have a PF that uploads the file to database. I got the insertedRecordCount and ErrorRecord count for the database update but to compare/verify I would also like to get the source file record count.
I tried to use putContextVar and below
But I get the size of file with Operation Count. Is there a way I can get record count of source file?
To fetch the record count of file source you can implement some logic through which you can get the Source record count. You can try using gateway condition, before gateway you can create a Put Context variable and initialize it with zero after that you can use java condition on Gateway and increment it's value by one. Before using java condition you have to create a process flow variable that will be initialized in PutContextVarTag1 then it can be fetched in java condition on the gateway.
So, after execution of your Source file you will get a total number of executed records for that file which can be use as record count of file source.