One Star

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

  • Data Integration
19 REPLIES
One Star

Re: tFileRowCount Count Rows

you can do this
One Star

Re: tFileRowCount Count Rows

Thank you. I have also found that I can use tAggregateRow to count rows.
One Star

Re: tFileRowCount Count Rows

Actually you can also use the global variable of your file component Smiley Wink
One Star

Re: tFileRowCount Count Rows

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
Employee

Re: tFileRowCount Count Rows

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.
One Star

Re: tFileRowCount Count Rows

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
Employee

Re: tFileRowCount Count Rows

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.
One Star

Re: tFileRowCount Count Rows

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 ?
Community Manager

Re: tFileRowCount Count Rows

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
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tFileRowCount Count Rows

Hai ,
I tried tfilerowcount (onsubjob ok)--> tfileinput delimited (main)--> tlogrow
The job is running successfully but i dont see the output in tlogrow.Should there be some specifications made to get the output of count of file.
One Star

Re: tFileRowCount Count Rows

Hi
While I use the tFileRowCount component to display the row count, its giving error.
tFileRowCount (main)--> TLogRow
Can anybody please explain how to get the total number of rows in a file using this component?
One Star

Re: tFileRowCount Count Rows

Hi friends how do i get the total number of rows in each column and what is the missing% in each column ..
Moderator

Re: tFileRowCount Count Rows

Hi anigotiyara,
Hi friends how do i get the total number of rows in each column and what is the missing% in each column ..

what's your scenario? If you process with a column of file, you can use "Nb_LINE" to count the total number of records have been proceed.
let me explain it more detail, if you are executing an operation "Insert data into tmysqloutput", and this option is set to Inserted, a global variable ((Integer)globalMap.get("tMysqlOutput_NB_LINE_INSERTED")), will counts the total number of records have been inserted.
More information of requirement will be preferred.
Best regards
Sabrina
One Star

Re: tFileRowCount Count Rows

It sounds like you want to do data profiling. You should look at TOS DQ.
One Star

Re: tFileRowCount Count Rows

Hi ,
  My file is in S3. How do i get the count of records from the S3 file and load the record count to a table in Redshift?
Need Help.
Cheers,
mk
Four Stars

Re: tFileRowCount Count Rows

I need to read the output file name  from tfileoutputdelimited like path context.Output_Path+"/"+"MART_PTNT_PRFL_LAB_"+TalendDate.getDate("CCYYMMDDhhmmss")+".dat" ..
After I need to create control file
I need to create a control File  which has file name of above and Count the no of lines
Ex:  filename.ctl
Inside data should like below 
filename|xxx(count)
Moderator

Re: tFileRowCount Count Rows

Hi sai8166,
What does your current job design look like?
For your job requirement, could you please elaborate your case with an example with input and expected output values?
Best regards
Sabrina
One Star

Re: tFileRowCount Count Rows

I am very new to talend. Currently, I am using Talend for big data 6.2. Now, I have simple scenario to get the record count coming from xml file.
Moderator

Re: tFileRowCount Count Rows

Hi VISsu,
For your requirement, could you please elaborate your case with an example with input and expected output values?
Best regards
Sabrina