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?

已提問 1 個月前檢視次數 171 次
2 個答案
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
專家
已回答 1 個月前
profile picture
專家
A_J
已審閱 1 個月前
0

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

profile picture
專家
已回答 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南