我试图在我的 CI/CD 开发中包含script_location并且仅包含此参数的更新。AWS 要求我包含必需的参数,例如RoleArn. 如何只更新我想要更改的作业配置部分?
这就是我正在尝试使用的
aws glue update-job --job-name <job_name> --job-update Command="{ScriptLocation=s3://<s3_path_to_script>}
Run Code Online (Sandbox Code Playgroud)
这就是发生的事情:
An error occurred (InvalidInputException) when calling the UpdateJob operation: Command name should not be null or empty.
如果我添加默认命令名称glueetl,则会发生以下情况:
An error occurred (InvalidInputException) when calling the UpdateJob operation: Role should not be null or empty.
小智 5
通过 CLI 更新粘合作业或粘合触发的简单方法是使用 --cli-input-json 选项。为了使用正确的 json,您可以使用aws glue update-job --generate-cli-skeleton返回完整结构的内容来插入更改。
前任:
{"JobName":"","JobUpdate":{"Description":"","LogUri":"","Role":"","ExecutionProperty":{"MaxConcurrentRuns":0},"Command":{"Name":"","ScriptLocation":"","PythonVersion":""},"DefaultArguments":{"KeyName":""},"NonOverridableArguments":{"KeyName":""},"Connections":{"Connections":[""]},"MaxRetries":0,"AllocatedCapacity":0,"Timeout":0,"MaxCapacity":null,"WorkerType":"G.1X","NumberOfWorkers":0,"SecurityConfiguration":"","NotificationProperty":{"NotifyDelayAfter":0},"GlueVersion":""}}
这里只需填写工作名称并更改选项即可。之后,您必须将 json 转换为单行 json 并使用以下命令发送到命令中' '
aws glue update-job --cli-input-json '<one-line-json>'
Run Code Online (Sandbox Code Playgroud)
我希望也能帮助解决这个问题的人。
参考:
| 归档时间: |
|
| 查看次数: |
7127 次 |
| 最近记录: |