nerdexam
Databricks

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

Which of the following operations can perform an outer join on two DataFrames?

The correct answer is D. DataFrame.join(). DataFrame.join() is the correct answer because it accepts a how parameter that supports outer join variants: "outer", "full", "full_outer", "left", "left_outer", "right", and "right_outer". DataFrame.crossJoin() (A) performs a Cartesian product, not an outer join. There is no…

Performing Data Transformations with Spark DataFrames

Question

Which of the following operations can perform an outer join on two DataFrames?

Options

  • ADataFrame.crossJoin()
  • BStandalone join() function
  • CDataFrame.outerJoin()
  • DDataFrame.join()
  • EDataFrame.merge()

How the community answered

(58 responses)
  • B
    2% (1)
  • C
    3% (2)
  • D
    93% (54)
  • E
    2% (1)

Explanation

DataFrame.join() is the correct answer because it accepts a how parameter that supports outer join variants: "outer", "full", "full_outer", "left", "left_outer", "right", and "right_outer". DataFrame.crossJoin() (A) performs a Cartesian product, not an outer join. There is no standalone join() function (B) or DataFrame.outerJoin() method (C) in PySpark. DataFrame.merge() (E) is a pandas method and does not exist on PySpark DataFrames.

Topics

#Spark DataFrames#Join Operations#Outer Join#DataFrame API

Community Discussion

No community discussion yet for this question.

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