Databricks Certified Associate Developer for Apache Spark 3.0 Exam Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Question # 2 Topic 1 Discussion

Databricks Certified Associate Developer for Apache Spark 3.0 Exam Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Question # 2 Topic 1 Discussion

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Exam Topic 1 Question 2 Discussion:
Question #: 2
Topic #: 1

The code block displayed below contains an error. The code block should return all rows of DataFrame transactionsDf, but including only columns storeId and predError. Find the error.

Code block:

spark.collect(transactionsDf.select("storeId", "predError"))


A.

Instead of select, DataFrame transactionsDf needs to be filtered using the filter operator.


B.

Columns storeId and predError need to be represented as a Python list, so they need to be wrapped in brackets ([]).


C.

The take method should be used instead of the collect method.


D.

Instead of collect, collectAsRows needs to be called.


E.

The collect method is not a method of the SparkSession object.


Get Premium Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.