glue treat empty string as null values


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 Answer
Accepted Answer

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

data_frame ='', subset=['MY_EMPTY_STRING_COL'])

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions