Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get 7 days data from the start date then again next 7 days

Hello,

In my scenario i have a table which can contain 10 k rows data , i want to perform operation to get total of  7 days cost  from the start date then again next 7 days data.

input table like this:- 

object_id, Object_name, Object_cost, Object_added_date

1,keyboard, 1000,10-10-2016

2,mouse, 1500,11-10-2016

3,monitor, 2000,12-10-2016

4,cellphone,10000,14-10-2016

5,headphone,1000,14-10-2016.

 

Thanks in advanced

 

 

 

regards,

Manish

Labels (2)
12 Replies
Anonymous
Not applicable
Author

is it possible to work on datetime, because in table column every datetime having different vaules and  i want to calculate sum total values on every day data then next day then up to 7 days, like this:-

 

added_date
2019-02-20 16:13:27
2019-02-20 16:13:55
2019-02-20 16:14:29
2019-02-20 16:14:56
2019-02-20 16:15:28
2019-02-21 03:40:26
2019-02-21 03:40:58
2019-02-21 03:41:28
2019-02-21 03:41:57
2019-02-21 03:42:27
2019-02-22 03:41:17
2019-02-22 03:41:47
2019-02-22 03:42:18
2019-02-22 03:42:48
2019-02-23 05:21:18
2019-02-23 05:21:44
2019-02-23 05:22:15
2019-02-23 05:22:45

 

thanks, 

vapukov
Master II
Master II

all possible!

but all depends - from what you really want/need ?! 🙂 

 

 

as variants:

why not make group by day in the database? and retrieve to talend date(without time) and sum per day? any database could do this fast and easy

then you return to original question

 

alternatives - make 2 tAggregateRow - first for aggregate per day (you will need additional column - datetime truncated to date), then again return to the original task

Anonymous
Not applicable
Author

0683p000009M6B4.jpg

hello @vapukov  sir,

can you plz explain me the marked step, after sync columns in tjava row, what code i write for no.3 step. 

thanks,

regards, 

Manish