QuestionQ116

VerifiedData Processing & Transformations

Which of the following commands will return the number of null values in the member_id column?

Explanation

The count_if() function in Spark SQL counts rows where a specified condition is true. Using count_if(member_id IS NULL) counts all rows where member_id is null. The count() function ignores nulls by design, and count_null() is not a standard Spark function; null() and FROM HISTORY are not valid SQL constructs.

Community Discussion

No comments yet. Be the first to start the discussion!