Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
I want to generate calendar data using tRowGenerator. please refer the attached calendar xlsx file. Based on that file I need to generate data for all column. please share your code and information.
Note: column name and data available in attached excel file.
This is a good learning exercise and is more of a Java question than a Talend question. I *could* do this for you, but it would not help you if I did it. I can give you a hint though. Essentially you need to work on generating your dates. You can do this by setting a start date, knowing how many days you want to iterate through and use the routines.TalendDate.addDate method iteratively for every subsequent day. Everything else you can either get based on that date using TalendDate functionality or you can create your own routine to apply specific logic.
You can not generate the attahced formatted data with tRowgenerator,you may can do writing some routien with java.
Hi @rhall,
I want to know how to create week_no_of_the_month and fiscal_yr_week columns using tRowgenerate with tmap. I cannot generate these two column values from calendar excel file. I have completed remaining columns from that file
date | week_no_of_the_month | fiscal_yr_week |
01-01-2017 | 1 | 40 |
02-01-2017 | 1 | 40 |
03-01-2017 | 1 | 40 |
04-01-2017 | 1 | 40 |
05-01-2017 | 1 | 40 |
06-01-2017 | 1 | 41 |
07-01-2017 | 1 | 41 |
08-01-2017 | 2 | 41 |
09-01-2017 | 2 | 41 |
10-01-2017 | 2 | 41 |
11-01-2017 | 2 | 41 |
12-01-2017 | 2 | 41 |
13-01-2017 | 2 | 42 |
14-01-2017 | 2 | 42 |
15-01-2017 | 3 | 42 |
16-01-2017 | 3 | 42 |
17-01-2017 | 3 | 42 |
18-01-2017 | 3 | 42 |
19-01-2017 | 3 | 42 |
20-01-2017 | 3 | 43 |
21-01-2017 | 3 | 43 |
22-01-2017 | 4 | 43 |
23-01-2017 | 4 | 43 |
24-01-2017 | 4 | 43 |
25-01-2017 | 4 | 43 |
26-01-2017 | 4 | 43 |
27-01-2017 | 4 | 44 |
28-01-2017 | 4 | 44 |
29-01-2017 | 5 | 44 |
30-01-2017 | 5 | 44 |
31-01-2017 | 5 | 44 |
01-02-2017 | 1 | 44 |
02-02-2017 | 1 | 44 |
03-02-2017 | 1 | 45 |
04-02-2017 | 1 | 45 |
05-02-2017 | 1 | 45 |
06-02-2017 | 1 | 45 |
07-02-2017 | 1 | 45 |
08-02-2017 | 2 | 45 |
09-02-2017 | 2 | 45 |
10-02-2017 | 2 | 46 |
11-02-2017 | 2 | 46 |
12-02-2017 | 2 | 46 |
13-02-2017 | 2 | 46 |
14-02-2017 | 2 | 46 |
15-02-2017 | 3 | 46 |
16-02-2017 | 3 | 46 |
17-02-2017 | 3 | 47 |
18-02-2017 | 3 | 47 |
19-02-2017 | 3 | 47 |
20-02-2017 | 3 | 47 |
21-02-2017 | 3 | 47 |
22-02-2017 | 4 | 47 |
23-02-2017 | 4 | 47 |
24-02-2017 | 4 | 48 |
25-02-2017 | 4 | 48 |
26-02-2017 | 4 | 48 |
27-02-2017 | 4 | 48 |
28-02-2017 | 4 | 48 |
This is one way of doing it......
https://stackoverflow.com/questions/10186626/java-fiscal-year-week-counter
You can generate that data with a tRowGenerator @manodwhb. You can use routines to generate data with the tRowGenerator. In fact, that is the main way in which you would generate any data with the tRowGenerator
Hi @rhall
I have generated calendar data using tRowGenerator with tmap. I will attach the job quickly
Would you mind sharing your job regarding generated calendar data using tRowGenerator