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

Certified Associate Developer for Apache Spark 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__])

Show Answer
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

1 comment
Sign in to comment
Sowwy1Option: E
Apr 10, 2024

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