简体   繁体   English

如何使用 Boto3 库在 AWS Glue 中创建工作流程?

[英]How to create a workflow in AWS Glue using Boto3 library?

I'm having problems to create a ETL workflow in AWS Glue using Boto3 library with all orchestration include.我在使用包含所有编排的 Boto3 库在 AWS Glue 中创建 ETL 工作流时遇到问题。 I created all jobs and triggers but when I use glue.create_workflow(Name="Test) command there's no way to include orchestration.我创建了所有作业和触发器,但是当我使用glue.create_workflow(Name="Test)命令时,无法包含编排。

I tried to use this parameter我尝试使用此参数

DefaultRunProperties={
        'string': 'string'
    }

With:和:

'--extra-files': 'file' #Like when you use a external libray in a job '--extra-files': 'file' #就像你在作业中使用外部库一样

'Graph': {'Nodes': [], 'Edges': []}} #Graph output using glue.get_workflow('Test') 'Graph': {'Nodes': [], 'Edges': []}} #Graph output 使用glue.get_workflow('Test')

Is this possible or you can only do this using AWS Console?这可能吗,或者您只能使用 AWS 控制台执行此操作?

I had the same issue and did not find any solution directly from the Boto3 module.我有同样的问题,没有直接从 Boto3 模块找到任何解决方案。

However, I discovered AWS Glue Blueprint which allows you to create workflows from a template and therefore to duplicate them easily with a few input parameters.但是,我发现了 AWS Glue Blueprint,它允许您从模板创建工作流,因此可以使用一些输入参数轻松复制它们。 It is then possible to start this Blueprint from Boto3 by giving it the right inputs.然后可以通过为 Boto3 提供正确的输入来启动此蓝图。

The official AWS documentation on this subject and their tutorial directory: https://docs.aws.amazon.com/glue/latest/dg/orchestrate-using-workflows.html https://github.com/awslabs/aws-glue-blueprint-libs关于此主题的官方 AWS 文档及其教程目录: https://docs.aws.amazon.com/glue/latest/dg/orchestrate-using-workflows.html https://github.com/awslabs/aws-glue -蓝图库

Hopefully this will help you希望这会帮助你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM