none
Convert utcnow() to epoch timestamp to put into Relative URI of HTTP dataset

    Question

  • As it is evident from the question, I have to use epoch timestamp in the relative URI of HTTP dataset.

    But when I am doing the following things, it is parsing incorrectly. Basically it is not giving me error but the request is ignoring the epoch parameter of the URI.

    responses/desc/50000/1/@{formatDateTime(adddays(utcnow(), -6), '%a %b %d %H:%M:%S +0000 %Y')}/json?X-apikey=542c0603951a208c4be688002d3c40116174

    responses/desc/50000/1/@{formatDateTime(adddays(utcnow(), -6), '%s')}/json?X-apikey=542c0603951a208c4be688002d3c40116174

    Can anybody help me here? I have been stuck here from couple of days. How to calculate or use seconds, esentially epoch time, in data factory?

    The following is working but its hardcoded.

    - responses/desc/50000/1/1525756206/json?X-apikey=542c0603951a208c4be688002d36f48808c40116174

    Monday, May 14, 2018 2:52 AM

All replies

  • Seems there is no easy way to get the timestamp directly. 

    You could use a custom-activity to get the timestamp first (https://docs.microsoft.com/en-us/azure/data-factory/transform-data-using-dotnet-custom-activity). And then reference the output of the custom activity in your http dataset.


    Tuesday, May 15, 2018 7:27 AM