QuestionQ154
VerifiedUsing Spark SQLA data scientist has been examining user profile data to create features for their model. Following exploratory data analysis, the data scientist identified that certain records in the user profiles have NULL values in too many fields to be useful.
The schema of the user profile table is:
user_id STRING,
username STRING,
full_name STRING,
date_of_birth DATE,
primary_email STRING,
created_ts TIMESTAMP,
updated_ts TIMESTAMP,
last_login_ts TIMESTAMP
The data scientist has determined that, if any record has a NULL value in any field, that record should be removed from the output before further processing.
Which Spark code block can be used to meet these requirements?
Community Discussion