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

Loading demo links...

Showing 10–12 of 23 questions

Question 10 (Topic 1)

Which of the following operations can be used to return a DataFrame with no duplicate rows? Please select the most complete answer.

Select an option, then click Submit answer.

  • DataFrame.distinct()
  • DataFrame.dropDuplicates() and DataFrame.distinct()
  • DataFrame.dropDuplicates()
  • DataFrame.drop_duplicates()
  • DataFrame.dropDuplicates(), DataFrame.distinct() and DataFrame.drop_duplicates()
Question 11 (Topic 1)

Which of the following code blocks will always return a new 4-partition DataFrame from the 8-partition DataFrame storesDF without inducing a shuffle?

Select an option, then click Submit answer.

  • storesDF.repartition(4, "sqft")
  • storesDF.repartition()
  • storesDF.coalesce(4)
  • storesDF.repartition(4)
  • storesDF.coalesce
Question 12 (Topic 1)

The code block shown below contains an error. The code block is intended to adjust the number of partitions used in wide transformations like join() to 32. Identify the error. Code block: spark.conf.set("spark.default.parallelism", "32")

Select an option, then click Submit answer.

  • spark.default.parallelism is not the right Spark configuration parameter – spark.sql.shuffle.partitions should be used instead.
  • There is no way to adjust the number of partitions used in wide transformations – it defaults to the number of total CPUs in the cluster.
  • Spark configuration parameters cannot be set in runtime.
  • Spark configuration parameters are not set with spark.conf.set().
  • The second argument should not be the string version of "32" – it should be the integer 32.