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

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

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

The code block displayed below contains an error. The code block should arrange the rows of DataFrame transactionsDf using information from two columns in an ordered fashion, arranging first by

column value, showing smaller numbers at the top and greater numbers at the bottom, and then by column predError, for which all values should be arranged in the inverse way of the order of items

in column value. Find the error.

Code block:

transactionsDf.orderBy('value', asc_nulls_first(col('predError')))


A.

Two orderBy statements with calls to the individual columns should be chained, instead of having both columns in one orderBy statement.


B.

Column value should be wrapped by the col() operator.


C.

Column predError should be sorted in a descending way, putting nulls last.


D.

Column predError should be sorted by desc_nulls_first() instead.


E.

Instead of orderBy, sort should be used.


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.