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

Loading demo links...

Showing 7–9 of 23 questions

Question 7 (Topic 1)

The code block shown below contains an error. The code block is intended to return a new DataFrame that is the result of a cross join between DataFrame storesDF and DataFrame employeesDF. Identify the error. Code block: storesDF.join(employeesDF, "cross")

Select an option, then click Submit answer.

  • A cross join is not implemented by the DataFrame.join() operations – the standalone CrossJoin() operation should be used instead.
  • There is no direct cross join in Spark, but it can be implemented by performing an outer join on all columns of both DataFrames.
  • A cross join is not implemented by the DataFrame.join()operation – the DataFrame.crossJoin()operation should be used instead.
  • There is no key column specified – the key column "storeId" should be the second argument.
  • A cross join is not implemented by the DataFrame.join() operations – the standalone join() operation should be used instead.
Question 8 (Topic 1)

In what order should the below lines of code be run in order to write DataFrame storesDF to file path filePath as parquet and partition by values in column division? Lines of code: 1. .write() \ 2. .partitionBy("division") \ 3. .parquet(filePath) 4. .storesDF \ 5. .repartition("division") 6. .write \ 7. .path(filePath, "parquet")

Select an option, then click Submit answer.

  • 4, 1, 2, 3
  • 4, 1, 5, 7
  • 4, 6, 2, 3
  • 4, 1, 5, 3
  • 4, 6, 2, 7
Question 9 (Topic 1)

The code block shown below contains an error. The code block intended to read a parquet at the file path filePath into a DataFrame. Identify the error. Code block: spark.read.load(filePath, source – "parquet")

Select an option, then click Submit answer.

  • There is no source parameter to the load() operation – the schema parameter should be used instead.
  • There is no load() operation – it should be parquet() instead.
  • The spark.read operation should be followed by parentheses to return a DataFrameReader object.
  • The filePath argument to the load() operation should be quoted.
  • There is no source parameter to the load() operation – it can be removed.