
Explanation:
In stream-static joins, Spark Structured Streaming allows inner joins regardless of the streaming side. For outer joins, the streaming DataFrame must be on the corresponding side (left for left outer, right for right outer). Option D attempts a left outer join with the static DataFrame on the left and the streaming DataFrame on the right, which is invalid. The other options are valid: A (right outer with stream on right), B (inner), and C (inner, assuming syntax error is a typo).
Ultimate access to all questions.
No comments yet.
Which code block demonstrates an incorrect implementation of a stream-static join between a streaming DataFrame streamingDF and a static table userLookup?
A
userLookup.join(streamingDF, ["user_id"], how="right")
B
streamingDF.join(userLookup, ["user_id"], how="inner")
C
userLookup.join(streamingDF, ["user_id"), how="inner")
D
userLookup.join(streamingDF, ["user_id"], how="left")