Global Variable returns zero records. I have to add a row count after all of the processing has been done. OATS_REPORT is the same file, and the data is being appended there. I don't know what I am doing wrong
If I understand your need, you want to know the number of lines in the file written by tFileOutputDelimited right after the tUnite. My advise is to use a tFlowMeter between tUnite and tFileOutputDelimited and to use its global variable NB_LINE.
Yes, you correctly understand what I want.
By some lucky coincidence I was able to arrive to the configuration that was able to give me what I wanted. I don't fully understand why it works, but it does.
Thank You
For your information, tAggregateRow is not the most optimized component to perform a row count operation. The solution I gave would avoid to read the generated file once again.
Hello,
I used tFileRowcount -> tFixedFlowInput -> tLogRow to get the number of lines of a CSV File.
I want to use this result for a max_number in a loop, but I don't know how to call it.
In the TFixedFlowInput I have Column = linenumber, Value = ((Integer)globalMap.get("tFileRowCount_1_COUNT")).
Is linenumber the global variable ? how do I call a global variable in a loop?
Thank you very much ?
Hello
You can set this global var ((Integer)globalMap.get("tFileRowCount_1_COUNT")) as max_number directly in a loop.eg:
tFileRowCount
|
onsubjobok
|
tLoop--iterate-->do another transaction
On tLoop, set 'to' field as: ((Integer)globalMap.get("tFileRowCount_1_COUNT"))
Best regards