Python shell jobs in AWS Glue support scripts that are compatible with
Python 2.7 and come pre-loaded with libraries such as the Boto3,
NumPy, SciPy, pandas, and others. You can run Python shell jobs using
1 DPU (Data Processing Unit) or 0.0625 DPU (which is 1/16 DPU). A
single DPU provides processing capacity that consists of 4 vCPUs of
compute and 16 GB of memory.
我认为即使我们将python库作为zip文件上传,如果您使用的库依赖于C扩展,它也不会工作。我曾尝试过使用Pandas、Holidays等,就像您尝试过的那样,在联系AWS支持人员时,他们提到它在他们的待办事项列表中(支持这些python libaries),但到目前为止还没有ETA。
因此,任何不是本机python的库,此时都不能在AWS Glue中工作。但应该会在不久的将来推出,因为这是一个流行的需求。
如果你还想试试,请refer to this link,在那里它解释了如何将外部库打包到AWS glue中运行,我试过了,但没有为我工作。
正如Yuva的回答所提到的,我相信目前不可能导入一个不完全用Python编写的库,文档也反映了这一点。
但是,如果有人来这里寻找关于如何在AWS Glue中导入python库的答案,那么这篇文章对如何使用pg8000库有一个很好的解释: AWS Glue - Truncate destination postgres table prior to insert
2019年1月22日发布的AWS胶水作业更新。
在AWS Glue中引入Python Shell作业——发布时间:2019年1月22日
更多信息请访问:https://aws.amazon.com/about-aws/whats-new/2019/01/introducing-python-shell-jobs-in-aws-glue/
https://docs.aws.amazon.com/glue/latest/dg/add-job-python.html
相关问题 更多 >
编程相关推荐