05-31-2022 08:54 AM
Hi,
I have a pipeline that is supposed to run on a daily basis and I’m struggling in writing the logic for a timeframe.
Basically, I have a API picking up data from Workday and we have two parameters (“to” and “from”) as following:
The problem is when I was reading the documentation, it says the the task.end result is an arbitrary date far in the future if I initiate the Task in designer.
What I want to do is:
Example:
Can someone help me with this?
Thank you so much! 🙂
05-31-2022 10:16 PM
@leonardoamorim you can use a file write and save you task end time in sldb. and next time you will read data from that file and use your from day from there. Your pipeline might be looks like below pic. You create a json file with from date, then upload in first file reader snap. After calling WD API you finish all your business logic then add mapper to set from date for next run and write as json file. Make sure your file reader and file write file name should be same (basically it should override old value always) and name of from date attribute should be same as in set from date mapper and used in WD API. I would prefer Date.now() to set from date rather task.end ,as you use to date as Date.now().
06-02-2022 02:23 AM
@Supratim works perfectly! Thank you so much!