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?

posta un mese fa170 visualizzazioni
2 Risposte
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
ESPERTO
con risposta un mese fa
profile picture
ESPERTO
A_J
verificato un mese fa
0

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

profile picture
ESPERTO
con risposta un mese fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande