Labour Day Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bigdisc65

Databricks Certification Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Exam Questions and Answers PDF

Page: 4 / 6
Question 16

The code block displayed below contains an error. The code block is intended to write DataFrame transactionsDf to disk as a parquet file in location /FileStore/transactions_split, using column

storeId as key for partitioning. Find the error.

Code block:

transactionsDf.write.format("parquet").partitionOn("storeId").save("/FileStore/transactions_split")A.

Options:

A.

The format("parquet") expression is inappropriate to use here, "parquet" should be passed as first argument to the save() operator and "/FileStore/transactions_split" as the second argument.

B.

Partitioning data by storeId is possible with the partitionBy expression, so partitionOn should be replaced by partitionBy.

C.

Partitioning data by storeId is possible with the bucketBy expression, so partitionOn should be replaced by bucketBy.

D.

partitionOn("storeId") should be called before the write operation.

E.

The format("parquet") expression should be removed and instead, the information should be added to the write expression like so: write("parquet").

Question 17

Which of the following describes the role of the cluster manager?

Options:

A.

The cluster manager schedules tasks on the cluster in client mode.

B.

The cluster manager schedules tasks on the cluster in local mode.

C.

The cluster manager allocates resources to Spark applications and maintains the executor processes in client mode.

D.

The cluster manager allocates resources to Spark applications and maintains the executor processes in remote mode.

E.

The cluster manager allocates resources to the DataFrame manager.

Question 18

The code block shown below should add column transactionDateForm to DataFrame transactionsDf. The column should express the unix-format timestamps in column transactionDate as string

type like Apr 26 (Sunday). Choose the answer that correctly fills the blanks in the code block to accomplish this.

transactionsDf.__1__(__2__, from_unixtime(__3__, __4__))

Options:

A.

1. withColumn

2. "transactionDateForm"

3. "MMM d (EEEE)"

4. "transactionDate"

B.

1. select

2. "transactionDate"

3. "transactionDateForm"

4. "MMM d (EEEE)"

C.

1. withColumn

2. "transactionDateForm"

3. "transactionDate"

4. "MMM d (EEEE)"

D.

1. withColumn

2. "transactionDateForm"

3. "transactionDate"

4. "MM d (EEE)"

E.

1. withColumnRenamed

2. "transactionDate"

3. "transactionDateForm"

4. "MM d (EEE)"

Question 19

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"))

Options:

A.

The select operator should be replaced by the drop operator and the arguments to the drop operator should be column names predError, productId and value wrapped in the col operator so they

should be expressed like drop(col(predError), col(productId), col(value)).

B.

The select operator should be replaced with the deselect operator.

C.

The column names in the select operator should not be strings and wrapped in the col operator, so they should be expressed like select(~col(predError), ~col(productId), ~col(value)).

D.

The select operator should be replaced by the drop operator.

E.

The select operator should be replaced by the drop operator and the arguments to the drop operator should be column names predError, productId and value as strings.

(Correct)

Page: 4 / 6
Exam Name: Databricks Certified Associate Developer for Apache Spark 3.0 Exam
Last Update: May 6, 2024
Questions: 180
Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 pdf

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 PDF

$28  $80
Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Engine

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Testing Engine

$33.25  $95
Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 PDF + Engine

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 PDF + Testing Engine

$45.5  $130