skip to Main Content

I am trying to execute an aws glue start-job-run command in a bash script where I need to pass multiple arguments in the –arguments parameter.

Here is an example of what I am expecting to do:

aws glue start-job-run –job-name my-job –arguments "–key1=value1 –key2=value2"

I have tried various approaches, but I haven’t been able to find a solution that works. Can someone help me understand how to properly format the arguments in this context?

Thanks in advance for the assistance!

2

Answers


  1. Arguments to a Glue job are a map.

    As with any other AWS CLI command, you have a choice of JSON syntax or shorthand syntax for providing maps:

    aws glue start-job-run --job-name my-job --arguments "key1=value1,key2=value2"
    

    or

    aws glue start-job-run --job-name my-job --arguments '{"key1":"value1","key2":"value2"}'
    
    Login or Signup to reply.
  2. If you refer the official document, , it says the arguments are map and below is the syntax to use it:

    --arguments (map) 
    

    Shorthand Syntax:

    KeyName1=string,KeyName2=string
    

    Usage:

    aws glue start-job-run --job-name my-job --arguments "KeyName1=value1,Keyname2=value2"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search