Skip to content
Advertisement

How to Post JSON to Durable Azure Function (Python)?

I would like to call Durable Azure Functions from Azure Data Factory. I would like to post json to Functions and get status when Function processing have completed. My ultimate goals is to successfully run Functions which takes 10min without timeout.

I have already successfully executed Azure Function Activity from ADF with method GET.

Now I need advice to modify Python code of Orchestrator to acceppt json and use json values to filtering which Result set is processed. {“Country”: “Japan”}

Current Code base is from Tutorial: https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-python-vscode

I’m following Durable Function instruction from here: http://datanrg.blogspot.com/2020/10/using-durable-functions-in-azure-data.html

JavaScript

Advertisement

Answer

Now I need advice to modify Python code of Orchestrator to accept Json and use Json values to filter which Result set is processed. {“Country”: “Japan”}

JavaScript

JSON should be fine to provide to the orchestrator as an input value. Here is an example that accomplishes a similar goal. Although the example uses a http trigger, the region that has to be addressed has nothing to do with the trigger you choose to utilize in the starter or triggering function.

As an alternative, you may develop a concrete class that is serializable and has the model/entity structure (much cleaner than raw Json). All we need is for your class to export two static methods, to Json() and from Json, to generate serializable classes (). These classes will be called repeatedly by the Durable Functions framework to serialize and deserialize your custom class.

Advertisement