nerdexam
Databricks

DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK · Question #138

Which of the following DataFrame operations is classified as a wide transformation?

The correct answer is B. DataFrame.join(). DataFrame.join() is a wide transformation because it requires a shuffle - data must be redistributed across partitions so that rows with matching keys are co-located before the join can execute. This cross-partition data movement is the defining characteristic of wide (shuffle)…

Spark DataFrame Transformation Types

Question

Which of the following DataFrame operations is classified as a wide transformation?

Options

  • ADataFrame.filter()
  • BDataFrame.join()
  • CDataFrame.select()
  • DDataFrame.drop()
  • EDataFrame.union()

How the community answered

(38 responses)
  • B
    92% (35)
  • C
    5% (2)
  • E
    3% (1)

Explanation

DataFrame.join() is a wide transformation because it requires a shuffle - data must be redistributed across partitions so that rows with matching keys are co-located before the join can execute. This cross-partition data movement is the defining characteristic of wide (shuffle) transformations in Spark.

The distractors are all narrow transformations: filter() evaluates each row in place, select() and drop() project columns within each partition, and union() simply concatenates two DataFrames without redistributing data - no shuffle is triggered by any of them.

Memory tip: Think "wide = data travels wide across the cluster." Any operation that must group or match rows from different partitions (like joining on a key, grouping, or distinct) is wide. Operations that work row-by-row or column-by-column within a partition stay narrow.

Topics

#Wide Transformations#DataFrame Operations#Shuffle Operations#Spark Fundamentals

Community Discussion

No community discussion yet for this question.

Full DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Practice