TEJ*_*MAR 3 amazon-ec2 amazon-web-services pyspark aws-glue aws-glue-data-catalog
我有 pyspark 脚本,可以在 AWS GLUE 中运行。但每次我从 UI 创建作业并将代码复制到作业时,我是否可以自动从 s3 存储桶中的文件创建作业。(我拥有运行时将使用的所有库和粘合上下文)
另一种选择是使用AWS CloudFormation。您可以在模板文件中定义要创建的所有 AWS 资源(不仅是 Glue 作业),然后在需要时从AWS 控制台或使用 cli更新堆栈。
胶水作业的模板如下所示:
MyJob:
Type: AWS::Glue::Job
Properties:
Command:
Name: glueetl
ScriptLocation: "s3://aws-glue-scripts//your-script-file.py"
DefaultArguments:
"--job-bookmark-option": "job-bookmark-enable"
ExecutionProperty:
MaxConcurrentRuns: 2
MaxRetries: 0
Name: cf-job1
Role: !Ref MyJobRole # reference to a Role resource which is not presented here
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7742 次 |
| 最近记录: |