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?

preguntada hace un mes171 visualizaciones
2 Respuestas
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
EXPERTO
respondido hace un mes
profile picture
EXPERTO
A_J
revisado hace un mes
0

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

profile picture
EXPERTO
respondido hace un mes

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas