Why i am getting error: option --key_name(argument) not recognized while running a glue job?

0

I am running a glue job with python script shell(version 3.9) and glue version is 3.0. I am passing 8 arguments to the glue job and accessing it using getResolvedOptions(args, options). One of the argument is not recognized and checked the logs it is saying error: option --key_name(argument) not recognized . May I know the reason for this error?

asked 12 days ago150 views
2 Answers
0

Hi,

Do you use some code like this one?

import sys
from awsglue.utils import getResolvedOptions

args = getResolvedOptions(sys.argv,
                          ['JOB_NAME',
                           'day_partition_key',
                           'hour_partition_key',
                           'day_partition_value',
                           'hour_partition_value'])
print "The day-partition key is: ", args['day_partition_key']
print "and the day-partition value is: ", args['day_partition_value']

In that case, try each of your 8 parameters until you find the incorrect one.

For more details, see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-pyspark-extensions-get-resolved-options.html

Best,

Didier

profile pictureAWS
EXPERT
answered 12 days ago
profile picture
EXPERT
reviewed 12 days ago
0

Arguments are case sensitive. Ensure you have the correct case.

profile picture
EXPERT
answered 12 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions