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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Determining Last Row

Hi everyone, I tried to follow this tutorial but when I try to build the job I have this error.

I did everything right from the tutorial and I have jdk 1.8 installed and used by talend (v6.4.1).

Could someone help me ? thanks for reading

Hi, I'm trying to develop a talend component where I process 5 records at a time, then at the end of the 5th record, I send the results to my output connection. I have this part working great, the only issue I am having is figuring out what to do if I have an uneven dataset.

Say I have 14 records total. How do I know on the 14th record that I am on the last record of the dataset? Ideally I would like to accomplish this all within my component, and within the main.javajet file, since I cannot send rows as output in the end.javajet file.

Thanks!

Labels (3)
4 Replies
Anonymous
Not applicable
Author

Hello,

What's tutorial are you referring to? Could you please post it on forum?

Best regards

Sabrina

ThWabi
Creator II
Creator II

Hello jaisonpaul,

 

here's my little suggestion:

Subjob 1: Read your data source and write the output to a tHashOutput component.

Subjob 2: Read your data from tHashInput (should be faster than reading from file or database again); if you create a sequence in a tMap, you can compare the sequence value to the value

(Integer) globalMap.get("tFileInputDelimited_1_NB_LINE")

(Substitue "tFileInputDelimited_1" with your input component.) If they are equal, you are processing the last record.

I hope this helps or gives you an idea.

 

Best regards,

 

Thomas

 

Anonymous
Not applicable
Author

Hey, I could use a little help with a Talend Job im creating. Its pretty simple. Its purpose is to iterate through a directory with certain files, rename them and write a log.txt if there is anything wrong. The log is written by a tFileOutputDelimited with informations given by a tJavaRow-Code. But the logfile isnt working correctly. For example there are Statement a, b and c comitted to the Output. Only b and c are written to the log.

Jesperrekuh
Specialist
Specialist

@Matilda44 , please open a new topic. Dont spam.