QuestionQ164

VerifiedTroubleshooting and Tuning Apache Spark DataFrame API Applications.

A data scientist is conducting a large-scale data-analysis project with Apache Spark on Databricks. The data scientist must join a large DataFrame containing customer transactions (200 million rows) with a smaller DataFrame containing product information (3000 rows).

How should the data scientist optimize the join operation for improved performance?

Explanation

A broadcast join should broadcast the small product-information DataFrame to all executors, allowing the large transactions DataFrame to be joined locally without shuffling its 200 million rows. Databricks recommends broadcasting the smaller side when one side of a join is a small dimension table.

Learn more

Community Discussion

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