Databricks Certified Associate Developer for Apache Spark — Question 50

Which of the following pairs of arguments cannot be used in DataFrame.join() to perform an inner join on two DataFrames, named and aliased with "a" and "b" respectively, to specify two key columns?

Answer options

Correct answer: B

Explanation

The correct answer is B because using col() with just the column names does not specify the DataFrame they belong to, which is required for the join operation. Options A, C, and E properly define the relationships between the columns in the respective DataFrames, making them valid for performing an inner join.