QuestionQ103

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which code block efficiently executes a broadcast join between DataFrame storesDF and the much larger DataFrame employeesDF, using storeId as the key column?

Explanation

A broadcast hint marks a DataFrame as small enough for a broadcast join. Broadcasting storesDF while joining it to employeesDF lets Spark distribute the small stores dataset to executors and join it with the much larger employees dataset without shuffling that large dataset. The storeId argument specifies an equi-join column that must exist in both DataFrames.

Learn more

Community Discussion

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