Free CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Databricks CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Practice Test Question

Loading demo links...

Showing 1–3 of 23 questions

Question 1 (Topic 1)

Which of the following DataFrame operations is classified as an action?

Select an option, then click Submit answer.

  • DataFrame.drop()
  • DataFrame.coalesce()
  • DataFrame.take()
  • DataFrame.join()
  • DataFrame.filter()
Question 2 (Topic 1)

Which of the following operations can be used to create a DataFrame with a subset of columns from DataFrame storesDF that are specified by name?

Select an option, then click Submit answer.

  • storesDF.subset()
  • storesDF.select()
  • storesDF.selectColumn()
  • storesDF.filter()
  • storesDF.drop()
Question 3 (Topic 1)

The code block shown below contains an error. The code block is intended to return a new DataFrame with the mean of column sqft from DataFrame storesDF in column sqftMean. Identify the error. Code block: storesDF.agg(mean("sqft").alias("sqftMean"))

Select an option, then click Submit answer.

  • The argument to the mean() operation should be a Column abject rather than a string column name.
  • The argument to the mean() operation should not be quoted.
  • The mean() operation is not a standalone function – it’s a method of the Column object.
  • The agg() operation is not appropriate here – the withColumn() operation should be used instead.
  • The only way to compute a mean of a column is with the mean() method from a DataFrame.