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

The code block shown below contains an error. The code block intended to return a new DataFrame that is the result of an inner join between DataFrame storesDF and DataFrame employeesDF on column storeId. Identify the error.

Code block:

StoresDF.join(employeesDF, Seq("storeId")

    Correct Answer: A

    The key column storeId needs to be a string like “storeId”. The error in the code block is that the column name should be a string literal to properly specify the join key.

Discussion
SaiPavan10Option: A

since the default join is inner so key column should be "StoreId"

newusernameOption: C

The answer (C) is just the most wrong that could have been here

deadbeef38

I don't see any error in the code other than a typo

Sowwy1Option: A

A is correct

saryuOption: A

A is right

cookiemonster42Option: A

I think the question is corrupt. The most plausible answer is A, even though the column name is already presented as a string.

newusername

yup, 100% is smth wrong, cause storesDF.join(employeesDF, Seq("storeId")) will work