Best Methods to Run Long Python Scripts on Azure VMs via ADF

0
2
Asked By CuriousCat97 On

I'm looking for effective ways to execute long-running Python scripts (which can take several hours) on an Azure VM that's behind a VPN, all initiated from an Azure Data Factory pipeline. Additionally, I need to receive back the execution status of these scripts in the pipeline. Any advice or strategies would be greatly appreciated!

3 Answers

Answered By ScriptSavant88 On

Have you thought about using systemctl along with an API? This could help manage your scripts, though it primarily checks if the service is running rather than the actual success of the script execution.

DataDynamo2023 -

True, that's only going to tell us if it's running, not whether it executed successfully or failed.

Answered By DataDynamo2023 On

You might find using a webhook to be a great solution. With a webhook, you can send an HTTP call that includes a callback URL for the Python app to return the completion status. That way, ADF gets notified once the script finishes.

SkepticalSquirrel -

But what happens if the app crashes and doesn't send any status? We could end up missing feedback in ADF.

Answered By TechieTurtle44 On

While I haven't worked specifically with VMs, have you considered using an Azure Function? It could potentially handle your needs without the VM. Just a thought!

CuriousCat97 -

I really need to run it from a VM since we already have multiple scripts set up there. We might switch to containers later on.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.