Relative Content

Tag Archive for pyspark

pySpark select json value column field not found

So below will return error because field ‘sex’ doesn’t exist. Is there a way to return nothing/null/empty when the field is not there instead throw an error? I will not use if to check each field because there are many fields.