Databricks Certified Associate Developer for Apache Spark — Question 174

The code block shown below contains an error. The code block intended to return a new DataFrame that is the result of an outer join between DataFrame storesDF and DataFrame employeesDF on column storeId. Identify the error.

Code block:

storesDF.join(employeesDF, "storeId")

Answer options

Correct answer: A

Explanation

The correct answer is A because the join method defaults to an inner join, and specifying 'outer' is necessary for the intended operation. Options B, C, D, and E are incorrect as they describe either valid practices or misunderstandings about the join method's functionality.