none
ADF v2 - DayOfWeek function support

    Question

  • currently ADF v1 has dayofweek function which returns day of the week, which enables us to combine weekly jobs with daily jobs -that doesn't exist in v2. Is there any plans to implement that?

    Thanks,


    byungjoon yoon, software engineer at servicelink

    Thursday, August 30, 2018 6:36 PM

All replies

  • If you're talking about running a Pipeline, the ADF2 Schedule Trigger supports Day of Week which you can use to run a job on specific days.

    The Day of Week options appears when you choose Recurrence/Weekly.

    Thursday, August 30, 2018 6:50 PM
  • I am aware of that, but in our usecase we are passing in file paths as arguments to spark jobs, so it has to be a function. Also schedule triggers seem to have a lot of limitations which makes it not too attractive for us.

    byungjoon yoon, software engineer at servicelink

    Thursday, August 30, 2018 7:06 PM
  • So, you 'calling' the Pipeline and it decides to run depending on the day of week.

    No problem, for that I would call a Logic App that makes such determinations.  If it's a day of the week to run the Pipeline, start a run of the Pipeline.

    Logic Apps has the dayOfWeek function and an ADF Connector to run the Pipeline.

    Thursday, August 30, 2018 7:51 PM
  • well I have to determine monday given a dynamic date, so logic apps won't work. I have to pass monday's dates for every single daily calls - weekly calls themselves work fine. Also that begs the question, this function was there in v1, but why didn't that move to v2? is there any specific reasoning for that? I would want to hear it.

    byungjoon yoon, software engineer at servicelink

    Thursday, August 30, 2018 8:07 PM
  • Sorry, I don't follow.  dayOfWeek will return the day of week for whatever date you pass it so, yes, you can determine Monday or not for any given date.  That's just how it works.

    Well, expressions are missing in many places in ADF, it's just a decision they made.  Azure apps can be composed of many services.  What you're asking to do is easily achievable with Logic App or even Functions.

    Thursday, August 30, 2018 8:53 PM
  • well maybe I can calculate monday's dates using logic app or function and pass that as parameter, which is an option I guess. Or I can just write a custom API myself to make that transition to monday, and let devs call those, which is probably easier option. I just feel if you are versioning up you should support all functions in previous versions if possible, and you would better have a good reason if not... 

    Use case here is we have weekly job that saves to a dated location, and daily job that saves to a dated location as well, and those daily jobs should be able to refer to that weekly output, hence the need for dayofweek. I can modify so that they save to two places, or just put in function that will calculate monday too, but still don't get why they just removed that function which was there in v1.

    Thanks


    byungjoon yoon, software engineer at servicelink

    Thursday, August 30, 2018 9:12 PM