0
0
Apache Sparkdata~5 mins

Inner, left, right, and full outer joins in Apache Spark - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is an inner join in Apache Spark?
An inner join returns only the rows that have matching keys in both DataFrames. It is like finding common friends between two groups.
Click to reveal answer
beginner
Explain a left outer join in simple terms.
A left outer join returns all rows from the left DataFrame and the matching rows from the right DataFrame. If there is no match, the right side will have null values.
Click to reveal answer
beginner
What does a right outer join do?
A right outer join returns all rows from the right DataFrame and the matching rows from the left DataFrame. If no match exists, the left side will have null values.
Click to reveal answer
beginner
Describe a full outer join.
A full outer join returns all rows from both DataFrames. When there is no match, the missing side will have null values. It combines left and right joins.
Click to reveal answer
intermediate
What is the difference between inner join and full outer join?
Inner join returns only matching rows from both DataFrames. Full outer join returns all rows from both DataFrames, filling nulls where there is no match.
Click to reveal answer
Which join returns only rows with matching keys in both DataFrames?
AFull outer join
BLeft outer join
CRight outer join
DInner join
In a left outer join, what happens if a row in the left DataFrame has no match in the right DataFrame?
AThe row appears with nulls for right DataFrame columns
BThe row is dropped
CThe row appears with nulls for left DataFrame columns
DAn error occurs
Which join returns all rows from the right DataFrame and matching rows from the left?
AInner join
BLeft outer join
CRight outer join
DFull outer join
What does a full outer join return?
AAll rows from both DataFrames, with nulls where no match
BAll rows from left only
CAll rows from right only
DOnly matching rows
If you want to keep only rows present in both DataFrames, which join do you use?
ARight outer join
BInner join
CLeft outer join
DFull outer join
Explain the difference between inner join, left outer join, right outer join, and full outer join in Apache Spark.
Think about which side's rows are always kept and how unmatched rows are handled.
You got /4 concepts.
    Describe a real-life example where you would use a left outer join versus a full outer join.
    Consider situations where you want to keep all from one list or all from both.
    You got /3 concepts.