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…
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)- A94% (32)
- B3% (1)
- D3% (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
Community Discussion
No community discussion yet for this question.