nerdexam
Databricks

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

Which of the following object types cannot be contained within a column of a Spark DataFrame?

The correct answer is A. DataFrame. Spark DataFrame columns hold scalar or semi-structured values - supported types include String, Integer, Double, Boolean, null, Array, Map, Struct, and MLlib's Vector (registered as a User Defined Type). A DataFrame itself is a distributed dataset - it is a top-level…

Understand Spark DataFrame structure and capabilities

Question

Which of the following object types cannot be contained within a column of a Spark DataFrame?

Options

  • ADataFrame
  • BString
  • CArray
  • Dnull
  • EVector

How the community answered

(34 responses)
  • A
    94% (32)
  • B
    3% (1)
  • D
    3% (1)

Explanation

Spark DataFrame columns hold scalar or semi-structured values - supported types include String, Integer, Double, Boolean, null, Array, Map, Struct, and MLlib's Vector (registered as a User Defined Type). A DataFrame itself is a distributed dataset - it is a top-level distributed collection, not a scalar value that can be nested inside a cell. Storing a DataFrame within a column of another DataFrame is architecturally incompatible with Spark's data model. All other listed types (String, Array, null, Vector) are valid Spark column value types.

Topics

#Spark DataFrame#Data Types#Column Types

Community Discussion

No community discussion yet for this question.

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