how to dynamic product date and deliver to others as a parameters by iterate

Six Stars

how to dynamic product date and deliver to others as a parameters by iterate

Hi everyone,

      This have a case. I must dynamic product date everryday.For example,today is 2018-12-13,

then dynamic product date 2018-12-13,2018-12-12,2018-12-11,2018-12-10,2018-12-09,(condition is date >= 2018-12-09),then tomorrow is 2018-12-14,2018-12-13,2018-12-12,2018-12-11,2018-12-10,2018-12-09.

After product date, deliver these date as a parameter by next component iterate.

How can I do it. Who can help. Thank you very much.

  


Accepted Solutions
Highlighted
Employee

Re: how to dynamic product date and deliver to others as a parameters by iterate

Hi,

    Below job can generate the product dates. In this flow,I have created the start date as 10-Dec-2018 .

image.png

 

 

 

The first stage will identify the difference between the input date (in context variable cut_offdate) and current date. It will store the data to another context variable called date_interval.

context variablescontext variables

 

trowgenerator1trowgenerator1

 

tmap1tmap1

 

tconverttypetconverttype

 

tjavarowtjavarow

 

 

Once you get the count, you can generate the values like below flow.

image.png

 

trowgenerator2trowgenerator2

 You can add a thashoutput in append mode instead of tlogrow to use the product date for later use

 

Warm Regards,
Nikhil Thampi

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

 

 

View solution in original post


All Replies
Highlighted
Employee

Re: how to dynamic product date and deliver to others as a parameters by iterate

Hi,

    Below job can generate the product dates. In this flow,I have created the start date as 10-Dec-2018 .

image.png

 

 

 

The first stage will identify the difference between the input date (in context variable cut_offdate) and current date. It will store the data to another context variable called date_interval.

context variablescontext variables

 

trowgenerator1trowgenerator1

 

tmap1tmap1

 

tconverttypetconverttype

 

tjavarowtjavarow

 

 

Once you get the count, you can generate the values like below flow.

image.png

 

trowgenerator2trowgenerator2

 You can add a thashoutput in append mode instead of tlogrow to use the product date for later use

 

Warm Regards,
Nikhil Thampi

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

 

 

View solution in original post

Highlighted
Six Stars

Re: how to dynamic product date and deliver to others as a parameters by iterate

Hi nikhilthampi,

 

       Thanks for your reply. And I have some idea from your Job.Many Thanks.

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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog