Databricks Certified Associate Developer For Apache Spark 30 · Free Practice Question Medium
Question 12
When joining two dataframes, if there is a need to evaluate the keys in both of the DataFrames or tables and include all rows from the right DataFrame as well as any rows in the left DataFrame that have a match in the righ DataFrame also If there is no equivalent row in the left DataFrame, we want to instert null: which join type should we select ? df1.join(person, joinExpression, joinType)
-
A
val joinType = “rightOuter” -
B
val joinType = “rightSemi” -
C
val joinType = “rightAnti”
Reveal correct answer
Correct answer:
Explanation
Correct answer is joinType = "right_outer". For example df1.join(person, joinExpression, “right_outer”).show()Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
