使用Azure功能解压缩文件 [英] Unzipping files with Azure Functions

查看:152
本文介绍了使用Azure功能解压缩文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用ADF从FTP中提取一些zip文件然后我想使用python Azure功能将原始存档中的四个特定文件解压缩,以便与一些复制步骤一起使用这条线。并且可能有另一个Azure
函数在副本完成后清理数据。


这是Azure函数的一个很好的用例,如果是这样,最好的方法是什么处理存储帐户时暂时解压缩所需的文件?

解决方案

以下是示例函数:


*打开压缩文件(具有".zip"扩展名)

*读取压缩文件中打包的文件


< a href ="https://github.com/yokawasa/azure-functions-python-samples/blob/master/v1functions/blob-trigger-blob-in-out-bindings/function_zip/run.py"> Azure Functions Blob触发Python示例读取Azure Blob存储中的Zip归档文件


请参阅
documentation 


如果上面的答案很有帮助,请点击'标记为答案'
和/或'投票为有用'这个帖子可以让其他用户遇到类似的问题。


I am wanting to use an ADF to pull some zip files from and FTP then I was thinking to use a python Azure function to unzip the four specific files out of the original archive to be used with some copy steps down the line. And possibly have another Azure function to clean up data once the copies are finished.

Is this a good use case for Azure Functions and if so what would be the best way to handle unzipping the needed files temporarily as far as storage accounts go?

解决方案

Below is the sample function which does:

* Open Zipped file (that has ".zip" extension)
* Read files packed in the zipped file

Azure Functions Blob Trigger Python Sample Reading Zip archived files from Azure Blob Storage

See other Python Samples from the documentation 

If the above answer was helpful, kindly do ‘Mark as answer" and/or ‘Vote as helpful’ the post for benefiting the other users with a similar issue.


这篇关于使用Azure功能解压缩文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆