Databricks Certified Associate Developer for Apache Spark — Question 69
The code block shown below should return a new DataFrame that is the result of an outer join between DataFrame storesDF and DataFrame employeesDF on column storeId. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.
Code block:
storesDF.__1__(__2__, __3__, __4__)
Answer options
- A. 1. join 2. employeesDF 3. "outer" 4. Seq("storeId")
- B. 1. merge 2. employeesDF 3. "outer" 4. Seq("storeId")
- C. 1. join 2. employeesDF 3. "outer" 4. storesDF.storeId === employeesDF.storeId
- D. 1. merge 2. employeesDF 3. Seq("storeId") 4. "outer"
- E. 1. join 2. employeesDF 3. Seq("storeId") 4. "outer"
Correct answer: E
Explanation
The correct answer is E because it utilizes the join method correctly with the outer join type specified last. Options A and C incorrectly position the join type and the join condition. Option B uses the merge method, which is not applicable in this context, and D incorrectly places the join type before the join keys.