英文:
AWS Glue Job Run continuously
问题
有没有任何替代方案?
英文:
I want to run a Glue ETL job continuously (i.e. start automatically when previous execution of the same job finishes)
a cron trigger won't help because job doesn't always take the same time to finish.
Is there any alternative?
答案1
得分: 1
你应该能够创建一个 Lambda 函数,实现以下功能:
-
在 Lambda 函数体内运行 Glue 作业,代码看起来会像这样:
import boto3 client = boto3.client('glue') jobname = 'your glue job' response = client.start_job_run(JobName=jobname)
-
当 Glue 作业成功运行时触发 Lambda 函数(通过一个 EventBridge 触发器,监视相关 Glue 作业的状态变化)
请参考以下文档:使用 CloudWatch 事件自动化 AWS Glue
如果有帮助,请告诉我!
英文:
You should be able to create a lambda function that:
-
Runs the glue job (in the body of the lambda). That would look something like this:
import boto3 client = boto3.client('glue') jobname = 'your glue job' response = client.start_job_run(JobName=jobname)
-
Is triggered when the glue job runs successfully (with an eventbridge trigger that looks at the glue job state change for the relevant glue job(s))
Refer to these docs: Automating AWS Glue with CloudWatch Events
Let me know if this helps!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论