Search code examples
aws-cliaws-glue

AWS glue job arguments error - Error parsing parameter '--arguments': Expected: ',', received: ''' for input:


I have created a pyspark script (glue job) and trying to run it through AWS CLI. In this command passing an argument name FILTER_CONDITION, the value of this argument is a date. When I tried to pass the date in a single quote (as mentioned in the below command) getting an error.

Command:

aws glue start-job-run --job-name myjob_test --arguments="--FILTER_CONDITION":"REPORT_DT=\'2019-01-01\'"

Error:

Error parsing parameter '--arguments': Expected: ',', received: ''' for

Solution

  • You need to escape quotes using back slash. I have used below command to start a Glue job with arguments and it ran fine with out any issues:

    aws glue start-job-run --job-name test2 --arguments "{\"--FILTER_CONDITION\": \"REPORT_DT='2019-01-01'\"}"