Exam Certified Associate Developer for Apache Spark All QuestionsBrowse all questions from this exam
Question 161

The code block shown below should return a new DataFrame that is the result of an inner join between DataFrame storesDF and DataFrame employeesDF on column storeId and column employeeId. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.

Code block:

storesDF.join(employeesDF, [__1__ == __2__, __3__ == __4__])

    Correct Answer: E

    To perform an inner join between two DataFrames on specific columns, you need to reference the DataFrame and their respective column names correctly. The correct format uses DataFrame.columnName for the matching columns. Therefore, the appropriate references are 1. storesDF.storeId, 2. employeesDF.storeId, 3. storesDF.employeeId, and 4. employeesDF.employeeId.

Discussion
Sowwy1Option: E

E. 1. storesDF.storeId 2. employeesDF.storeId 3. storesDF.employeeId 4. employeesDF.employeeId