如何在AWS Glue中导入Spark软件包? [英] How to import Spark packages in AWS Glue?

查看:114
本文介绍了如何在AWS Glue中导入Spark软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用GrameFrames软件包,如果要在本地运行pyspark,我将使用以下命令:

I would like to use the GrameFrames package, if I were to run pyspark locally I would use the command:

<代码>〜/hadoop/spark-2.3.1-bin-hadoop2.7/bin/pyspark --packages graphframes:graphframes:0.6.0-spark2.3-s_2.11

但是我将如何使用此程序包运行AWS Glue脚本?我在文档中什么都没找到...

But how would I run a AWS Glue script with this package? I found nothing in the documentation...

推荐答案

可以使用如下图框:

下载graphframes python库软件包文件,例如来自此处.解压缩 .tar.gz ,然后重新存档到 .zip .在s3中的某个位置放置您的粘合作业可以访问的

Download the graphframes python library package file e.g. from here. Unzip the .tar.gz and then re-archive to a .zip. Put somewhere in s3 that your glue job has access to

设置胶粘作业时:

  • 确保您的Python库路径引用了zip文件
  • 对于作业参数,您需要 {-conf":"spark.jars.packages = graphframes:graphframes:0.6.0-spark2.3-s_2.11"}

这篇关于如何在AWS Glue中导入Spark软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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