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

Loading demo links...

Showing 13–15 of 23 questions

Question 13 (Topic 1)

The code block shown below contains an error. The code block is intended to create and register a SQL UDF named “ASSESS_PERFORMANCE” using the Scala function assessPerformance() and apply it to column customerSatisfaction in the table stores. Identify the error. Code block: spark.udf.register(“ASSESS_PERFORMANCE”, assessPerforance) spark.sql(“SELECT customerSatisfaction, assessPerformance(customerSatisfaction) AS result FROM stores”)

Select an option, then click Submit answer.

  • The customerSatisfaction column cannot be called twice inside the SQL statement.
  • Registered UDFs cannot be applied inside of a SQL statement.
  • The order of the arguments to spark.udf.register() should be reversed.
  • The wrong SQL function is used to compute column result - it should be ASSESS_PERFORMANCE instead of assessPerformance.
  • There is no sql() operation - the DataFrame API must be used to apply the UDF assessPerformance().
Question 14 (Topic 1)

Which of the following pairs of arguments cannot be used in DataFrame.join() to perform an inner join on two DataFrames, named and aliased with "a" and "b" respectively, to specify two key columns column1 and column2?

Select an option, then click Submit answer.

  • joinExprs = col(“a.column1”) === col(“b.column1”) and col(“a.column2”) === col(“b.column2”)
  • usingColumns = Seq(col(“column1”), col(“column2”))
  • All of these options can be used to perform an inner join with two key columns.
  • joinExprs = storesDF(“column1”) === employeesDF(“column1”) and storesDF(“column2”) === employeesDF (“column2”)
  • usingColumns = Seq(“column1”, “column2”)
Question 15 (Topic 1)

Which of the following best describes the similarities and differences between the MEMORY_ONLY storage level and the MEMORY_AND_DISK storage level?

Select an option, then click Submit answer.

  • The MEMORY_ONLY storage level will store as much data as possible in memory and will store any data that does on fit in memory on disk and read it as it's called. The MEMORY_AND_DISK storage level will store as much data as possible in memory and will recompute any data that does not fit in memory as it’s called.
  • The MEMORY_ONLY storage level will store as much data as possible in memory on two cluster nodes and will recompute any data that does not fit in memory as it’s called. The MEMORY_AND_DISK storage level will store as much data as possible in memory on two cluster nodes and will store any data that does on fit in memory on disk and read it as it's called.
  • The MEMORY_ONLY storage level will store as much data as possible in memory on two cluster nodes and will store any data that does on fit in memory on disk and read it as it's called. The MEMORY_AND_DISK storage level will store as much data as possible in memory on two cluster nodes and will recompute any data that does not fit in memory as it's called.
  • The MEMORY_ONLY storage level will store as much data as possible in memory and will recompute any data that does not fit in memory as it's called. The MEMORY_AND_DISK storage level will store as much data as possible in memory and will store any data that does on fit in memory on disk and read it as it's called.
  • The MEMORY_ONLY storage level will store as much data as possible in memory and will recompute any data that does not fit in memory as it’s called. The MEMORY_AND_DISK storage level will store half of the data in memory and store half of the memory on disk. This provides quick preview and better logical plan design.