Associate-Developer-Apache-Spark-3.5 Exam Question 26

A developer needs to produce a Python dictionary using data stored in a small Parquet table, which looks like this:

The resulting Python dictionary must contain a mapping of region -> region id containing the smallest 3 region_id values.
Which code fragment meets the requirements?
A)

B)

C)

D)

The resulting Python dictionary must contain a mapping of region -> region_id for the smallest 3 region_id values.
Which code fragment meets the requirements?
  • Associate-Developer-Apache-Spark-3.5 Exam Question 27

    25 of 55.
    A Data Analyst is working on employees_df and needs to add a new column where a 10% tax is calculated on the salary.
    Additionally, the DataFrame contains the column age, which is not needed.
    Which code fragment adds the tax column and removes the age column?
  • Associate-Developer-Apache-Spark-3.5 Exam Question 28

    14 of 55.
    A developer created a DataFrame with columns color, fruit, and taste, and wrote the data to a Parquet directory using:
    df.write.partitionBy("color", "taste").parquet("/path/to/output")
    What is the result of this code?
  • Associate-Developer-Apache-Spark-3.5 Exam Question 29

    16 of 55.
    A data engineer is reviewing a Spark application that applies several transformations to a DataFrame but notices that the job does not start executing immediately.
    Which two characteristics of Apache Spark's execution model explain this behavior? (Choose 2 answers)
  • Associate-Developer-Apache-Spark-3.5 Exam Question 30

    A data analyst builds a Spark application to analyze finance data and performs the following operations: filter, select, groupBy, and coalesce.
    Which operation results in a shuffle?