awsdocs/aws-glue-developer-guide

Can not specify job language when creating a job

nabi-rd opened this issue · 2 comments

I am trying to create a job:

aws glue create-job \
	--name test-ga-agg \
	--description 'Test  job' \
	--role My-role \
	--command Name=glueetl,ScriptLocation=s3://my-bucket/Agg.scala \
	--glue-version '0.9' \
	--number-of-workers 2 \
	--worker-type G.2X \
	--arguments='-job-language=scala'

And getting the following error:

Unknown options: --arguments=

https://github.com/awsdocs/aws-glue-developer-guide/blob/master/doc_source/aws-glue-programming-etl-glue-arguments.md
This page does not have proper documentation for how to specify language, also there is a typo at the bottom, it says --argument instead of --arguments.

Hi @nabi-rd . I apologize for the very late response to your issue.

The page you linked to in the documentation does show the job language parameter:
--job-language — The script programming language. This value must be either scala or python. If this parameter is not present, the default is python

The command syntax you showed however, is from the CLI. From the CLI reference for AWS Glue, it appears the arguments parameter has changed. There are now two options:
[--default-arguments ] and
[--non-overridable-arguments ] - Use this for special job parameters that cannot be overridden in triggers or when you run the job.

These parameters are described as they appear in the console: https://docs.aws.amazon.com/glue/latest/dg/add-job.html (See Job parameters and Non-overrideable job parameters). Here, t says "You pass job parameters as a map when using the AWS Command Line Interface."

There should be better links to this content from the CLI reference, or the arguments added to the "Special Parameters Used by AWS Glue" topic in the developer guide.

Does that answer your question?

Thanks for replying, I have completely moved on and used boto instead, you can close this ticket.