Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Date plus one day with update attribute

avatar
Contributor

Hey everyone,

I want to make an API request for every single day in a period.

MarioFRS_1-1660743746472.png

 

I have defined a start date and an end date in the Generate Flow File Procesor

MarioFRS_2-1660743842652.png

the api structure is as follows

https://example.com/interfaces?session=${SessionId}&date_start=${since}&date_end=${since}

and now I want to loop with route on attribute and update attribute to request all days in this time period.

now the question how can I, the attribute of the start date always increase by one day. with the following expression in the update attribute processore I get an empty field as result

${since:toNumber():plus(86400000):format('yyyy-MM-dd')}

MarioFRS_3-1660744604543.png

Result

MarioFRS_4-1660744717225.png

Does anyone have an idea what adjusted we

 

1 ACCEPTED SOLUTION

avatar
Super Guru

Hi,

Try the following Expression:

 

${since:toDate('yyyy-MM-dd'):toNumber():plus(86400000):format('yyyy-MM-dd')}

 

If you find this helpful please accept solution. Thanks

 

 

 

View solution in original post

2 REPLIES 2

avatar
Super Guru

Hi,

Try the following Expression:

 

${since:toDate('yyyy-MM-dd'):toNumber():plus(86400000):format('yyyy-MM-dd')}

 

If you find this helpful please accept solution. Thanks

 

 

 

avatar
Contributor

Hi,

Thank you for your support. The conversion to a date form type I had not in mind