Capture and log start and end timestamp of ADF pipeline execution?

Krishna Bharat Yedla 66 Reputation points
2021-12-14T09:43:46.203+00:00

I have a set of ADF Pipelines to run in parallel.
Before the start of pipelines execution and end of the pipelines execution, Need to capture start time and end time and log (eg. write to a file).
Basically to calculate how much time duration is taking to run the set of pipelines.

Can anyone provide suggestions the best way/process to capture the timestamps?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
0 comments No comments
{count} votes

Accepted answer
  1. HimanshuSinha-msft 19,486 Reputation points Microsoft Employee Moderator
    2021-12-15T21:13:33.827+00:00

    Hello @Krishna Bharat Yedla ,
    Thanks for the ask and using Microsoft Q&A platform .
    There are couple of ways by which we can do that . From the UI , you can check it as shown in the below screenshot
    157945-image.png

    In case if you want to capture the time within the pipeline you can do that also as shown in the screenshot below . At this time we do not have a function whcih gives the difference in dates , so we cab use the ticks function . The output can in nanoseconds but then you can use the div function and chanhe this in any time unit you want .
    157939-image.png

    Dynamic expression for time in millisecond

    @ hide (div(sub(ticks(formatDateTime(variables('endtime'))),ticks(formatDateTime(variables('starttime')))),1000))

    Please do let me know how it goes .
    Thanks
    Himanshu

    -------------------------------------------------------------------------------------------------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.