Dynamic table creation

Five Stars

Dynamic table creation

Hii All,

I am new t talend i have a requirement where i have input file like

Date                       Hall_Number      Booked_by

01-10 Jan 2018       hall 2                  Rajesh

05-20 Feb                hall 5                  Naresh

 

i want to change this format into 

Date                      Hall_Number         Booked_By

01-Jan-2018            hall 2                    Rajesh

02-Jan-2018            hall 2                    Rajesh

.

.

05-Jan-2018            hall 2                    Rajesh

05-Feb-2018           hall 5                     Naresh

06_Feb-2018          Hall 5                    Naresh

.

.

.

.

.

please help me how to do this...

 

Thanks & Regards

Mastan Shaik

 


Accepted Solutions
Nine Stars

Re: Dynamic table creation

Hi,

 

Please find the details below. There might be easy way to achieve this using java code for loop. I am not good at Java so tried to implement this  without using java looping. For this you need to first identify start date and end date for input date. Used tMap1 to derive these values and difference between these two dates. created context variable to assign these difference in dates and used that context variable in Oracle to get number of records.

 

DatesLoop1.PNGDatesLoop2.PNGDatesLoop3.PNGDatesLoop4.PNGDatesLoop5.PNG

 

Regards,

Veeru Boppudi

All Replies
Nine Stars

Re: Dynamic table creation

Hi Mastan,

 

So you want to generate number of records based on input date range?

 

Regards,

Veeru Boppudi
Five Stars

Re: Dynamic table creation

Hi,

Thanks for respond,

Yes, I want to generate number of records based on input date range. which i send already..please send me sample job design.

 

 

Thanks & Regards

Mastan SHaik

Nine Stars

Re: Dynamic table creation

Hi,

 

Please find the details below. There might be easy way to achieve this using java code for loop. I am not good at Java so tried to implement this  without using java looping. For this you need to first identify start date and end date for input date. Used tMap1 to derive these values and difference between these two dates. created context variable to assign these difference in dates and used that context variable in Oracle to get number of records.

 

DatesLoop1.PNGDatesLoop2.PNGDatesLoop3.PNGDatesLoop4.PNGDatesLoop5.PNG

 

Regards,

Veeru Boppudi
Five Stars

Re: Dynamic table creation

thankyou fro shatrig the screen shots 

.But i still getting the run time error

ALL_ROWS all_tables' doesn't exist.

what is the purpose of select statement in the torcle component

"select rownum-1 as rno from ALL_TABLES where ROWNUM<="+context.numDays

 

please explain