I have a set of rows in a table X as
job1 20170506 Sat Not Run
job1 20170507 Sun Completed
job1 20170508 Mon Not Run
job1 20170513 Sat Completed
job1 20170514 Sun Failed
job1 20170515 Mon Not Run
job1 20170520 Sat Not Run
job1 20170521 Sun Not run
job1 20170522 Mon Not Run
job2 20170506 Sat Failed
job2 20170507 Sun Not run
job2 20170508 Mon Completed
job2 20170513 Sat Completed
job2 20170514 Sun Completed
job2 20170515 Mon Completed
job2 20170520 Sat Not Run
job2 20170521 Sun Not run
job2 20170522 Mon Not Run
and so on.
I need to take weekend (Sat, Sun, Mon) as a single entity and should get a resulting table as follows:
job1 20170507 Sun Completed
job1 20170513 Sat Completed
job1 20170522 Mon Not Run
job2 20170508 Mon Completed
job2 20170515 Mon Completed
job2 20170522 Mon Not Run
If the job has an entry completed in any of these three days, it is considered as completed. Otherwise if all are Not run, then latest entry with Not Run is to be taken. How is it possible in talend.
I can create a table containing Sat to Mon interval dates as follows:
Table Y
20170506 Sat 20170508 Mon
20170513 Sat 20170515 Mon
20170520 Sat 20170522 Mon
Please give me an idea, should I use tJava, or tIntervalMatch components, how is it possible.
Ok. If I understood your requirement clearly then I think this would be your answer.
Input(EntireTable) --> Tmap(Left outer Join) --> Complt_FLG = "Y" then all set ^ | | Lkp(Records only the status as Completed, Complt_FLG as "Y")
if Complt_FLG is null (that means not Y) then use taggregate and get max date record by grouping on Job id.
Please let me know if this is what you are looking for or any questions.