Databricks Certified Data Engineer Professional — Question 74
You are performing a join operation to combine values from a static userLookup table with a streaming DataFrame streamingDF.
Which code block attempts to perform an invalid stream-static join?
Answer options
- A. userLookup.join(streamingDF, ["userid"], how="inner")
- B. streamingDF.join(userLookup, ["user_id"], how="outer")
- C. streamingDF.join(userLookup, ["user_id”], how="left")
- D. streamingDF.join(userLookup, ["userid"], how="inner")
- E. userLookup.join(streamingDF, ["user_id"], how="right")
Correct answer: B
Explanation
Option B is the correct answer because it attempts to join on a column name that does not exist in the userLookup table, which is 'user_id'. The other options either use valid column names for the join or perform valid join operations between the static and streaming DataFrames.