Create Glue job using downloaded JSON code

0

Hello.

Is there any Glue API which can create a Glue job with a downloaded JSON code from Glue Studio editor?

Or can the downloaded code only be used to upload to Glue Studio editor manually?

Thank you.

  • I'm looking for cross-account Glue job migration solution.

    I think the steps is like below.

    1. Creating a Glue job in Glue Studio in account A(job a).

    2. Getting a code of the job a(b). (I thought getting the code by using 'Download' in Glue Studio, but 'get-job' API also can be used; We don't have a Git repository compatible with Git integration in Glue Studio.)

    3. Migrating a job by using the code(b) to account B. <- How to do this other than 'Upload' manually?

已提问 1 个月前47 查看次数
1 回答
0

Hello,

We do offer the action to create a Glue Job utilising the Glue API as well as downloading the JSON code from the Glue studio.

These actions require a few steps:

In AWS CLI: Creating the Glue Job: [1]

Downloading the JSON code from the Glue Studio to (e.g. Downloads folder):

  1. Run [2] “aws glue get-job —job-name glue-job-name” to retrieve script location then insert to next command
  2. Run [3] “aws s3 cp s3://script location/glue-job.py ./Downloads/glue-job-name.py” These following steps will help you utilise the Glue API in which you can create a Glue job as well as download the JSON code from the Glue Studio Editor from AWS CLI.

References:

[1] https://awscli.amazonaws.com/v2/documentation/api/latest/reference/glue/create-job.html

[2] https://awscli.amazonaws.com/v2/documentation/api/latest/reference/glue/get-job.html

[3] https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/cp.html

profile pictureAWS
已回答 1 个月前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则