[英]How to run python script with Azure Data Factory using files on a VM?
I have a VM that contains files that I run a python script against.我有一个 VM,其中包含我针对其运行 python 脚本的文件。 How could I make a data factory pipeline on my local machine that connects to the VM and runs the python script?
如何在连接到 VM 并运行 python 脚本的本地计算机上创建数据工厂管道?
I have looked into using a custom batch activity, but I'm not sure how this can connect to the VM.我研究过使用自定义批处理活动,但我不确定它如何连接到 VM。
Thanks a lot非常感谢
Yes, You can Upload the python script into Azure blob storage , First connect Blob storage to VM and also we can use AzCopy to upload files into Azure Blob Storage.是的,您可以将python 脚本上传到Azure blob 存储,首先将 Blob 存储连接到VM ,我们也可以使用AzCopy将文件上传到 Azure Blob 存储。
Follow these steps for Custom batch activity and use Below Reference in which we have detailed information about:按照以下步骤进行自定义批处理活动,并使用下面的参考,我们在其中提供了有关以下方面的详细信息:
Create the Azure Batch Account创建Azure批量账号
Create the Azure Pool.创建 Azure 池。 You can follow this link for Azure Pool creation https://learn.microsoft.com/en-us/azure/batch/quick-create-portal
您可以点击此链接进行 Azure 池创建https://learn.microsoft.com/en-us/azure/batch/quick-create-portal
Upload the python script in the Azure blob storage在 Azure blob 存储中上传 python 脚本
Add the custom activity in the Azure Data factory Pipeline and configure to use the Azure batch pool and run the python script Default output of any batch activity is stored in storage account under output/stdout.txt and if any program failure happens, it will get stored in output/stderr.txt在 Azure 数据工厂管道中添加自定义活动并配置为使用 Azure 批处理池并运行 python 脚本默认 output 任何批处理活动存储在output/stdout.txt下的存储帐户中,如果发生任何程序故障,它将获取存储在output/stderr.txt
Reference:参考:
https://azurelib.com/custom-activity-azure-data-factory/ https://azurelib.com/custom-activity-azure-data-factory/
https://medium.com/@ashish.kats/custom-batch-activity-in-azure-data-factory-110d8c1c957b https://medium.com/@ashish.kats/custom-batch-activity-in-azure-data-factory-110d8c1c957b
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.