Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFileRowCount Count Rows

Greetings,
How can I use this component? tFileRowCount, I can not find description anywhere.
How can I count rows in a file?
Thank You

Labels (2)
19 Replies
Anonymous
Not applicable
Author

you can do this
Anonymous
Not applicable
Author

Thank you. I have also found that I can use tAggregateRow to count rows.
Anonymous
Not applicable
Author

Actually you can also use the global variable of your file component 0683p000009MA9p.png
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

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 ?
Anonymous
Not applicable
Author

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

shong