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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ