简体   繁体   English

如何使用 VM 上的文件使用 Azure 数据工厂运行 python 脚本?

[英]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:按照以下步骤进行自定义批处理活动,并使用下面的参考,我们在其中提供了有关以下方面的详细信息:

  1. Create the Azure Batch Account创建Azure批量账号

  2. 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

  3. Upload the python script in the Azure blob storage在 Azure blob 存储中上传 python 脚本

  4. 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.

相关问题 Azure 数据工厂触发器创建使用 python - Azure data factory trigger creation using python 如何在 Java Eclipse 上运行 Azure 数据工厂管道 - How to run Azure Data Factory pipeline on Java Eclipse 如何使用 azure 数据工厂从 sql 数据库中删除记录 - How to delete records from a sql database using azure data factory 如何使用 azure 数据工厂删除活动删除子文件夹? - How to delete sub folder using azure data factory delete activity? Azure 数据工厂 Python SDK 创建触发器 - Azure Data Factory Python SDK Create Trigger Azure数据工厂-如何过滤掉多个Zip.文件中的特定文件? - Azure Data Factory - How to filter out specific files in multiple Zip. files? 在使用 terraform 部署脚本以启用 Azure 数据工厂中的客户管理密钥时,我收到一个错误,我在下面说明了这一点 - On deploying Script to enable Customer Managed Key in Azure Data Factory using terraform, I am getting an error which I have stated below 如何使用 python 脚本提取多部分的 zip 文件以在 Google Cloud Function 中运行 - How to extract zip files with multi parts using python script to run in Google Cloud Function 如何检查管道是否存在于 Azure 数据工厂中? - How to check if the pipeline exists in the Azure Data Factory? 将 zip 文件解压缩到 Azure 数据工厂中的 zip 文件中 - Unzip zip files within a zip file in Azure Data Factory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM