Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Associate Developer for Apache Spark All Questions

View all questions & answers for the Certified Associate Developer for Apache Spark exam

Exam Certified Associate Developer for Apache Spark topic 1 question 51 discussion

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, "inner", "storeID")

  • A. The key column storeID needs to be wrapped in the col() operation.
  • B. The key column storeID needs to be in a list like ["storeID"].
  • C. The key column storeID needs to be specified in an expression of both DataFrame columns like storesDF.storeId == employeesDF.storeId.
  • D. There is no DataFrame.join() operation – DataFrame.merge() should be used instead.
  • E. The column key is the second parameter to join() and the type of join in the third parameter to join() – the second and third arguments should be switched.
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
newusername
1 year ago
Selected Answer: E
there are diff methods to join dataframes, one of the: joinedDF = StoresDF.join(employeesDF, "storeId", "inner")
upvoted 1 times
...
Jtic
1 year, 6 months ago
Selected Answer: E
E storesDF.join(employeesDF, "storeID", "inner") The column key is the second parameter to join() and the type of join is in the third parameter to join() – the second and third arguments should be switched
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...