QuestionQ273

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

The code block below must efficiently execute a broadcast join between DataFrame storesDF and the much larger DataFrame employeesDF, using key column storeId.

Choose the response that correctly completes the numbered blanks in the code block to perform this task.

__1__.join(__2__(__3__), "storeId")  
Explanation

broadcast(df) marks the small DataFrame for broadcast during a join. Broadcasting storesDF and joining it to employeesDF on storeId produces employeesDF.join(broadcast(storesDF), "storeId"), avoiding redistribution of the much larger employee data.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!