Looping every month

Highlighted
Eight Stars

Looping every month

I want to loop every month  with start_date as start date of the month and end_Date as End date of the month 

 

Once loaded then it has to go previous month dates and keep going back so that i can load every month data into the table

Tags (1)
Employee

Re: Looping every month

Hi,

 

   If you want to create new records based on two date values, you can achieve them in following steps.

 

a) Identify the number of records by calculating the difference between start date and end date using TalendDate.diffDate function and store the value to a context variable.

b) Use add date function TalendDate.addDate(start_date,i,"DD") where i need to iterate from 0 to context variable value. You can also use tRowgnerator to create these dummy records.

 

Try it out first and if you are stuck with logic, you can come back and I will be happy to help :-) Please add your job screen shots with error area details if you are having any issues.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now