Date Difference excluding Weekends and Custom Holiday List
![Prakhyath](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar8.png)
Scenario: Our team was working on financial and ticketing data for one of our client and we had encountered a situation where we had to compute the working days available between two dates excluding weekends and custom holiday list provided by clients.
Workaround: Since we don't have any processor feature in any of the visual recipe capable of achieving the exact solution, we had to develop a code snippet in python to facilitate the same. The only short coming in this approach is the time consumed in execution of python recipe is relatively expensive.
Comments
-
Custom calendars are used in my business as well. Our factories have specific definitions of manufacturing days, and typically, when performing date calculations, we also want to know the number of working days between two dates. It'd be helpful if a calendar table could be linked to Dataiku's date processors to avoid the manual effort of setting it up. I've tried to do something like this using a Python processor in the prepare recipe, but it doesn't work since other datasets cannot currently be referenced from within processors. So ultimately, it takes custom code, either a separate Python recipe or a SQL step in the prepare recipe for referencing the calendar table. The date tools built into Dataiku are much more powerful and much easier to use than either of these methods, though, so the ability to pass in a custom calendar to those tools would be a big workflow improvement.
-
ElieA Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered, Product Ideas Manager Posts: 31 Dataiker
Thanks again for your idea, @Prakhyath
. Your idea meets the criteria for submission, we'll reach out should we require more information.If you’re reading this and think this would be a great capability to add to DSS, be sure to kudos the original post!
Take care,
Elie