简体   繁体   中英

AWS Glue CLI - Job Parameters

We are currently updating glue job using CLI commands. In the console, we have the ability to add job parameters as such:

控制台中的作业参数

I would like to replicate this in the CLI command. Currently, I have the following:

-name: Update Glue job
 run: |
    aws glue update-job --job-name "${{ env.notebook_name }}-job" \
       --job-update "Role=${{ env.glue_service_role }}, Command={Name=glueetl, ScriptLocation=${{ env.aws_s3_bucket }}/etl/${{ env.notebook_name }}_${GITHUB_SHA}.py}, DefaultArguments={'--job-bookmark-option':'job-bookmark-enable', '--enable-metrics': 'enable', '--enable-continuous-cloudwatch-log': 'enable'}" \
       --region ${{ env.region }}

My assumption is that I cannot add this job parameter under "DefaultArguments". I was using the following AWS Doc: https://docs.aws.amazon.com/cli/latest/reference/glue/update-job.html . I did not see a job parameter options.

What am I missing? Thank you!

You have to use default arguments if you believe that the values won't change. Otherwise, you have to pass the arguments while triggering the glue job from CLI something like this

aws glue start-job-run --job-name my-job --arguments myarg='myavlue'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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