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

Loading demo links...

Showing 16–18 of 23 questions

Question 16 (Topic 1)

The code block shown below should return a new DataFrame where column division from DataFrame storesDF has been renamed to column state and column managerName from DataFrame storesDF has been renamed to column managerFullName. Choose the response that correctly fills in the numbered blanks within the code block to complete this task. Code block: storesDF. __1__(__2__, __2__).__4__(__5__, __6__)

Select an option, then click Submit answer.

  • 1. withColumnRenamed 2."state" 3."division" 4.withColumnRenamed 5."managerFullName" 6."managerName"
  • 1.withColumnRenamed 2.division 3.col("state") 4. withColumnRenamed 5."managerName" 6.col("managerFullName")
  • 1. WithColumnRenamed 2. "division" 3."state" 4. withColumnRenamed 5. "managerName" 6."managerFullName"
  • 1. withColumn 2. "division" 3. "state" 4.withcolumn 5."managerName" 6."managerFullName
  • 1. withColumn 2. "division" 3. "state" 4. withColumn 5."managerName" 6."managerFullName"
Question 17 (Topic 1)

The code block shown below should return a new DataFrame where column productСategories only has one word per row, resulting in a DataFrame with many more rows than DataFrame storesDF. Choose the response that correctly fills in the numbered blanks within the code block to complete this task. A sample of storesDF is displayed below: Code block: storesDF.__1__(__2__, __3__(__4__(__5__)))

Select an option, then click Submit answer.

  • 1. newColumn 2. "productCategories" 3. col 4. split 5. "productCategories"
  • 1. withColumn 2. "productCategory" 3. split 4. col 5. "productCategories"
  • 1. withColumn 2. "productCategory" 3. explode 4. col 5. "productCategories"
  • 1. newColumn 2. "productCategory" 3. explode 4. col 5. "productCategories"
  • 1. withColumn 2. "productCategories" 3. explode 4. col 5. "productCategories"
Question 18 (Topic 1)

The code block shown below should print the schema of DataFrame storesDF. Choose the response that correctly fills in the numbered blanks within the code block to complete this task. Code block: __1__.__2__(__3__)

Select an option, then click Submit answer.

  • 1. storesDF 2. schema 3. Nothing
  • 1. storesDF 2. str 3. schema
  • 1. storesDF 2. printSchema 3. True
  • 1. storesDF 2. printSchema 3. Nothing
  • 1. storesDF 2. printSchema 3. "all"