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

multiply the rows with dates

Hi everyone. I'm new with talend open studio . I have some trouble when using it. Is there any way to I can get my expected output from this input?
INPUT
DATE (yyyymmdd) | ip | FINISHED ( 1:finished; 0: not finish)
2017-01-01 | 111 | 1
2017-01-01 | 222 | 1
2017-01-02 | 333 | 1
2017-01-03 | 444 | 1


EXPECTED OUTPUT
DATE (yyyymmdd) | ip | FINISHED ( 1:finished; 0: not finish)
2017-01-01 | 111 | 1
2017-01-01 | 222 | 1
2017-01-01 | 333 | 0
2017-01-01 | 444 | 0
2017-01-02 | 111 | 1
2017-01-02 | 222 | 1
2017-01-02 | 333 | 1
2017-01-02 | 444 | 0
2017-01-03 | 111 | 1
2017-01-03 | 222 | 1
2017-01-03 | 333 | 1
2017-01-03 | 444 | 1

 

Can someone show me the way to do it?
Your help is very much appreciated.
Regards, 

Thang

Labels (3)
25 Replies
Anonymous
Not applicable
Author

hi fdenis. Did you mean join like this in tmap?


Screenshot from 2018-10-02 16-01-34.png
fdenis
Master
Master

yes you are on the good way
Anonymous
Not applicable
Author

From that step what shoud I do next fdenis?

fdenis
Master
Master

you have to link row 13 and row 14 to row 15
then on the output hoan_thanh write:
(comparDate(row15.finished_Timestamp, row15.finished_Timestamp)>0)?"1":"0"

timestamp have to be Date Type
Anonymous
Not applicable
Author

it runs but all rows in col Hoan_thanh ( which is finished) all in 0

fdenis
Master
Master


(comparDate(row15.finished_Timestamp, row15.finished_Timestamp)>0)?"1":"0"

 


(comparDate(row15.finished_Timestamp, row13.finished_Timestamp)>0)?"1":"0"

 

it will be better

Anonymous
Not applicable
Author

Hi fdenis

I followed your instruction then linked it but unfortunately when I linked it but row15.finished_timestamp still get null in that row ( I checked the same data pattern, compare with just yyyy-MM-dd ). the output full of 2 and of course I did'n change anything in tmap setting) 

Picture bellow


Screenshot from 2018-10-03 11-49-44.png
Screenshot from 2018-10-03 11-50-00.png
Screenshot from 2018-10-03 12-05-18.png
Screenshot from 2018-10-03 12-07-30.png
Screenshot from 2018-10-03 12-08-29.png
fdenis
Master
Master

do not link date in tMap, only id.
date are managed to define if it's finished or not .
Anonymous
Not applicable
Author

hi fdenis,

You asked me to link row13 into row15. Row13 contains date . If I don't link it in row15 don't have any date so date contains will be null. Should I add a column finished_timestamp into the finished csv?

Anonymous
Not applicable
Author

hi fdenis

Like you said , I didn't like row13 into row15 . However, I add to file finished a col wich is finished_timestamp than in the output just like in picture but the file still all in 2.In file data I sure it has the date. I format the date in data pattern just like the formate in file . 

Which step did I do wrong?


Screenshot from 2018-10-03 15-22-18.png