如何使用python代码检查AWS胶粘作业状态?

时间:2019-12-18 11:17:03

标签: amazon-web-services aws-glue

我指的是以下链接,以获取工作状态。我不想创建或开始工作。我只想知道在get_job_run()函数中输入什么。如何通过不经过列表的硬编码来输入作业名称和运行ID?

https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html

1 个答案:

答案 0 :(得分:0)

我不好,我很困惑。

您将必须使用cloudwatch事件,然后触发lambda或sns主题。有关更多详细信息,请检查https://docs.aws.amazon.com/glue/latest/dg/automating-awsglue-with-cloudwatch-events.html

get_job_run()需要仅在开始工作时会获得的jobid。或者,您可以使用get_job_runs()https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue.html#Glue.Client.get_job_runs