Databricks Certified Associate Developer for Apache Spark — Question 151

Which of the following operations can be used to perform a left join on two DataFrames?

Answer options

Correct answer: A

Explanation

The correct answer is A, as DataFrame.join() is specifically designed to perform join operations including left joins. Options B and D are incorrect because DataFrame.crossJoin() does not perform a left join, and DataFrame.leftJoin() is not a valid method. Option C, DataFrame.merge(), can also perform joins but does not specifically indicate a left join without additional parameters, and option E is not a valid function for DataFrames.