1

I have an extra API which I need to access using my Python REST client (OAuth and tokens are everything sorted). But I would like to invoke this python client in my Data Factory as I want to store the results into Azure SQL warehouse.

Any help on how to do it?

1 Answer 1

1

What you want is a custom activity, this way you can run a Python script with Data Factory. For this you need to create an extra resource, Azure Batch.

More info here: https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-dotnet-custom-activity and here https://learn.microsoft.com/en-us/azure/batch/batch-python-tutorial#batch-python-tutorial-code-sample

If you dont like that option, you can use a Web activity, that also calls a custom REST api. Documentation: https://learn.microsoft.com/en-us/azure/data-factory/control-flow-web-activity

Hope this helped!

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks Martin. It helped.
Hi Martin, Just a follow up question. I have also setup Dataset as Http File. It can also reach the endpoint and extract the results. I am confused which one should I choose?
You mean like its explained here? learn.microsoft.com/en-us/azure/data-factory/connector-http I think this is the easier way, i would use a custom activity for more complex stuff than getting data from an http, so definitely for with the http dataset and copy activity
Correct. What kind of complex stuff you are talking about that can be done in custom activity and not in http dataset? I am comparitively new to Factory actually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.