You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
Which component can I use to compare the previous row and the current row.
I try to explain my problem. I have many same rows with a different date, and I want to take only the most recent one. I will sort (in descend order) to have the most recent row at the first position. My Application is in JAVA. I have to load the Data from AS400 to Postgresql.
I have already use tDBInput and tPostgresqlOutput, it’s OK , but I don’t know how to filter thi first row with the most recent Date.
Thanks in advance for your Help.
tle
Offline
Hi
Use the tSortRow component to sort the date.
tDBInput-->tSortRow--->tPostgresqlOoutput
Best regards
shong
Offline
Hi
If you just want to get the most recent row, Can't tSortRow component fit your need? I don't know why you will read the previous row and compare the previous to the current row.
I create a simple job to show how to read the previous row and compare it to the current row. Please see the screenshots
tFileInputCSV:
25
12
36
245
24
85
100
Best regards
shong
Offline

How can you get the previous row, can you show your tMap, I don't know the syntax to get the previous . I want to read the previous row because I have to ignore them and get only the most recent one (filter on the date)
tle
Offline
Hi
I have compressed the screenshot of tMap as it is too big. Can you see it clearly?
Best regards
shong
Offline
Hi
The globalMap.put("variableName",value) defined a global variable and globalMap.get("variableName") get the value of the variable.
Best regards
shong
Offline

Hi,
I have to work with a counter in my job begenning with a value of 100'000 . I have create a tJavaflex with a start code like this "globalMap.put("ID_PERSONNE_D",100000L);".
But in my tRunjob I can't retrieve my counter's value.
I have logged the tJavaflex, and it's ok, I have my counter's value , but I can't use it with a tRunJob. It's my screenshots below. Perhaps there is another solution to initialize a counter at the beginning of a Job, but tJavaflex and tRunjob, it's not OK. Or I have make mistake somewhere ?
Thanks for your help.
tle
Offline

Hi,
Please, somebody can help me for my problem of using globalMap and tJavaFlex ? I only want to increment a counter beginning at 100000 (the increment is necessary if records change, because I have many same records)
I have search a lot, but I don't find documentation for tJavaFlex, globalMap......
Thanks a lot if someone can help me
tle
Offline
Hi
If you want to pass a parameter from father job to child job, you should define a context in child job, then use tRunJob component to run the child job and pass the parameter.
Please see the screenshots
Best regards
shong
Offline

Hi Shong,
I have made a mistake yesterday, I have used (in your example ) the context of Job test instead of it properties to get glbalMap, and I didn't have the globalMap value. But I know that I can to use context (parameter) to get gloMap value if I use tRunJob
It's Ok now, and very good.
Shong, are you cheneese (with your name) ? I am vietnameese !!!! It's more easy for me to explain in french but I think that the forum use English language !!!!
Thanks a lot for your help .
tle
Offline
Sory everybody, i have to send a private message for tle, but this forum does not have private message function.
@tle: cậu đang làm việc ở đâu thế, có yahoo hoặc mobile ko? Tớ cũng đang làm 1 dự án với Talend, có thế liên lạc để trao đổi kinh nghiệm,
redhungpt@yahoo.com.
Thanks.
Last edited by minhhuy (2007-12-12 03:48:07)
Offline
Hi
You can send a email to him...
Feel free to post your questions on forum!
Best regards
shong
Offline
Pages: 1