gpt4 book ai didi

amazon-web-services - AWS Glue 自动创建作业

转载 作者:行者123 更新时间:2023-12-05 01:41:33 24 4
gpt4 key购买 nike

我有可以在 AWS GLUE 中运行的 pyspark 脚本。但是每次我从 UI 创建工作并将我的代码复制到工作中时。无论如何我可以从 s3 存储桶中的文件自动创建工作。 (我有运行时会用到的所有库和胶水上下文)

最佳答案

另一种选择是使用 AWS CloudFormation .您可以在模板文件中定义要创建的所有 AWS 资源(不仅是 Glue 作业),然后在需要时从 AWS Console 更新堆栈或 using cli .

Glue job 的模板看起来像这样:

  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

关于amazon-web-services - AWS Glue 自动创建作业,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54193618/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com