Seven Stars RAJ
Seven Stars

How to generate calendar data using tRowGenerator

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.

 

 

Thanks
RAJ
6 REPLIES
Fifteen Stars

Re: How to generate calendar data using tRowGenerator

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.

Rilhia Solutions
Twelve Stars

Re: How to generate calendar data using tRowGenerator

You can not generate the attahced formatted data with tRowgenerator,you may can do writing some routien with java.

Manohar B
Seven Stars RAJ
Seven Stars

Re: How to generate calendar data using tRowGenerator

Hi @rhall_2_0,

 

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

 

dateweek_no_of_the_monthfiscal_yr_week
01-01-2017140
02-01-2017140
03-01-2017140
04-01-2017140
05-01-2017140
06-01-2017141
07-01-2017141
08-01-2017241
09-01-2017241
10-01-2017241
11-01-2017241
12-01-2017241
13-01-2017242
14-01-2017242
15-01-2017342
16-01-2017342
17-01-2017342
18-01-2017342
19-01-2017342
20-01-2017343
21-01-2017343
22-01-2017443
23-01-2017443
24-01-2017443
25-01-2017443
26-01-2017443
27-01-2017444
28-01-2017444
29-01-2017544
30-01-2017544
31-01-2017544
01-02-2017144
02-02-2017144
03-02-2017145
04-02-2017145
05-02-2017145
06-02-2017145
07-02-2017145
08-02-2017245
09-02-2017245
10-02-2017246
11-02-2017246
12-02-2017246
13-02-2017246
14-02-2017246
15-02-2017346
16-02-2017346
17-02-2017347
18-02-2017347
19-02-2017347
20-02-2017347
21-02-2017347
22-02-2017447
23-02-2017447
24-02-2017448
25-02-2017448
26-02-2017448
27-02-2017448
28-02-2017448
Thanks
RAJ
Fifteen Stars

Re: How to generate calendar data using tRowGenerator

Fifteen Stars

Re: How to generate calendar data using tRowGenerator

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

Rilhia Solutions
Seven Stars RAJ
Seven Stars

Re: How to generate calendar data using tRowGenerator

Hi @rhall_2_0

 

I have generated calendar data using tRowGenerator with tmap. I will attach the job quickly 

Thanks
RAJ