Associate-Developer-Apache-Spark Exam Question 1

Which of the following code blocks prints out in how many rows the expression Inc. appears in the string-type column supplier of DataFrame itemsDf?
  • Associate-Developer-Apache-Spark Exam Question 2

    Which of the following is not a feature of Adaptive Query Execution?
  • Associate-Developer-Apache-Spark Exam Question 3

    The code block shown below should convert up to 5 rows in DataFrame transactionsDf that have the value 25 in column storeId into a Python list. Choose the answer that correctly fills the blanks in the code block to accomplish this.
    Code block:
    transactionsDf.__1__(__2__).__3__(__4__)
  • Associate-Developer-Apache-Spark Exam Question 4

    The code block displayed below contains an error. The code block is intended to return all columns of DataFrame transactionsDf except for columns predError, productId, and value. Find the error.
    Excerpt of DataFrame transactionsDf:
    transactionsDf.select(~col("predError"), ~col("productId"), ~col("value"))
  • Associate-Developer-Apache-Spark Exam Question 5

    Which of the following code blocks reads the parquet file stored at filePath into DataFrame itemsDf, using a valid schema for the sample of itemsDf shown below?
    Sample of itemsDf:
    1.+------+-----------------------------+-------------------+
    2.|itemId|attributes |supplier |
    3.+------+-----------------------------+-------------------+
    4.|1 |[blue, winter, cozy] |Sports Company Inc.|
    5.|2 |[red, summer, fresh, cooling]|YetiX |
    6.|3 |[green, summer, travel] |Sports Company Inc.|
    7.+------+-----------------------------+-------------------+