• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » USage of Variable NB_LINE (Number of line)

#1 2007-10-11 14:38:34

cenbells
Member
Registered: 2007-10-08
Posts: 35

USage of Variable NB_LINE (Number of line)

Tags: [CSV file, nb_line]

Hi Folks,

i just came across the variable NB_LINE of a tFileInputCSV component. Its description says that it contains the number of the line.
Either the description is misleading or there is a problem with the variable. Currently (2.2.0GA) it is only available after the Job reading a csv is finished. Hence it contains the total number of lines in the input file.

But especially for logging it would be helpful to get the actual line of the file. I helped myself by looking it up in the code and directly accessing the variable nb_line_tFileInputCSV_x for this task.

I just wondered if this is as intended or if it is a problem with the variable?

Kind regards,
Ken

Offline

#2 2007-10-12 08:52:37

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: USage of Variable NB_LINE (Number of line)

Hi Ken

In fact, The variable NB_LINE is the number of processing rows.

I just wondered if this is as intended or if it is a problem with the variable?

Via NB_LINE, we can know that how many records have been processed successfully.

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2007-11-19 05:01:48

benjams007
Member
Registered: 2007-11-08
Posts: 11

Re: USage of Variable NB_LINE (Number of line)

I used this variable just fine. I like to keep the file position (IE location of the line being parsed) in the DB so that I can always find it later if need be. I used the following line to put this into the output file

output_row.file_position= nb_line_tFileInputCSV_1;

Happy logging smile

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » USage of Variable NB_LINE (Number of line)

Board footer

Powered by FluxBB