Webhook activity for Python3 runbook execution

Maryna Paluyanava 211 Reputation points
2023-02-02T09:15:38.5266667+00:00

Hello,

I created an Automation Account and Python3 runbook. Python script takes files from Blob storage and makes some transformations on them and after that new files are created in Blob storage.
I am testing on simple Python script like this:

python_code.PNG

In ADF I created Webhook activity to run a runbook but it always ends with timed out status (when my script completed successfully and when it failed).
I want to receive somehow the info that the script completed successfully and after start copy data activity.

I found similar problem here:
https://learn.microsoft.com/en-us/answers/questions/717496/capturing-runbook-error-in-adf-through-webhooks
Could you please tell me if it is possible to implement for Python?

webhook.PNG

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

Accepted answer
  1. ShaikMaheer-MSFT 37,971 Reputation points Microsoft Employee
    2023-02-03T16:23:27.1766667+00:00

    Hi Maryna Paluyanava,

    Thank you for posting query in Microsoft Q&A Platform.

    Webhook activity sends callbackUri property in request to API and wait for API to invoke callbackUri to indicate it as sucess.

    You can consider modifying you code to invoke that callbackUri property URL at the end of process, that way webhook activity will be notified that your task successfully completed.

    Or

    Since you can use web activity to make API call and then have Get Meta Data activity to check if file created on not storage. That way you can identify your process ran successfully or not.

    Please check below videos for better idea on web, webhook and get meta data activities.

    Web Activity in Azure Data Factory

    Web Hook Activity in Azure Data Factory

    GetMetaData activity in Azure Data Factory

    Hope this helps. Please let me know if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful