Databricks Certified Associate Developer for Apache Spark — Question 72

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

Code block:

StoresDF.join(employeesDF, Seq("storeId")

Answer options

Correct answer: A

Explanation

The correct answer is A because the join method requires the column name to be provided as a string, and without proper quotation marks, it will throw an error. Options B, C, D, and E are incorrect as they do not address the specific issue of the missing string format for the column name in the join method.