glue treat empty string as null values

0

Hi Team,

I run an AWS glue job that reads data from a CSV file located on an S3 bucket to my aurora MySQL DB. My job fails because it interprets an empty string from the CSV ("") as a null value then try to insert it in a non-nullable column. is there a specific configuration in glue / pyspark code to prevent the job to treat an empty string as null?

1回答
0
承認された回答

I added this workaround on my pySpark script and that solve the issue :

data_frame = data_frame.na.fill('', subset=['MY_EMPTY_STRING_COL'])

Jess
回答済み 2年前

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

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

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

関連するコンテンツ