Summer Certification Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = getmirror

Pass the Databricks Certification Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Premium Access

View all detail and faqs for the Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 exam


672 Students Passed

91% Average Score

97% Same Questions
Viewing page 5 out of 6 pages
Viewing questions 41-50 out of questions
Questions # 41:

The code block shown below should write DataFrame transactionsDf to disk at path csvPath as a single CSV file, using tabs (\t characters) as separators between columns, expressing missing

values as string n/a, and omitting a header row with column names. Choose the answer that correctly fills the blanks in the code block to accomplish this.

transactionsDf.__1__.write.__2__(__3__, " ").__4__.__5__(csvPath)

Options:

A.

1. coalesce(1)

2. option

3. "sep"

4. option("header", True)

5. path

B.

1. coalesce(1)

2. option

3. "colsep"

4. option("nullValue", "n/a")

5. path

C.

1. repartition(1)

2. option

3. "sep"

4. option("nullValue", "n/a")

5. csv

(Correct)

D.

1. csv

2. option

3. "sep"

4. option("emptyValue", "n/a")

5. path

1. repartition(1)

2. mode

3. "sep"

4. mode("nullValue", "n/a")

5. csv

Questions # 42:

The code block displayed below contains an error. The code block should configure Spark so that DataFrames up to a size of 20 MB will be broadcast to all worker nodes when performing a join.

Find the error.

Code block:

Options:

A.

spark.conf.set("spark.sql.autoBroadcastJoinThreshold", 20)

B.

Spark will only broadcast DataFrames that are much smaller than the default value.

C.

The correct option to write configurations is through spark.config and not spark.conf.

D.

Spark will only apply the limit to threshold joins and not to other joins.

E.

The passed limit has the wrong variable type.

F.

The command is evaluated lazily and needs to be followed by an action.

Questions # 43:

Which of the following code blocks returns a one-column DataFrame of all values in column supplier of DataFrame itemsDf that do not contain the letter X? In the DataFrame, every value should

only be listed once.

Sample of DataFrame itemsDf:

1.+------+--------------------+--------------------+-------------------+

2.|itemId| itemName| attributes| supplier|

3.+------+--------------------+--------------------+-------------------+

4.| 1|Thick Coat for Wa...|[blue, winter, cozy]|Sports Company Inc.|

5.| 2|Elegant Outdoors ...|[red, summer, fre...| YetiX|

6.| 3| Outdoors Backpack|[green, summer, t...|Sports Company Inc.|

7.+------+--------------------+--------------------+-------------------+

Options:

A.

itemsDf.filter(col(supplier).not_contains('X')).select(supplier).distinct()

B.

itemsDf.select(~col('supplier').contains('X')).distinct()

C.

itemsDf.filter(not(col('supplier').contains('X'))).select('supplier').unique()

D.

itemsDf.filter(~col('supplier').contains('X')).select('supplier').distinct()

E.

itemsDf.filter(!col('supplier').contains('X')).select(col('supplier')).unique()

Questions # 44:

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.

Questions # 45:

Which of the following options describes the responsibility of the executors in Spark?

Options:

A.

The executors accept jobs from the driver, analyze those jobs, and return results to the driver.

B.

The executors accept tasks from the driver, execute those tasks, and return results to the cluster manager.

C.

The executors accept tasks from the driver, execute those tasks, and return results to the driver.

D.

The executors accept tasks from the cluster manager, execute those tasks, and return results to the driver.

E.

The executors accept jobs from the driver, plan those jobs, and return results to the cluster manager.

Questions # 46:

The code block shown below should return a DataFrame with columns transactionsId, predError, value, and f from DataFrame transactionsDf. Choose the answer that correctly fills the blanks in the

code block to accomplish this.

transactionsDf.__1__(__2__)

Options:

A.

1. filter

2. "transactionId", "predError", "value", "f"

B.

1. select

2. "transactionId, predError, value, f"

C.

1. select

2. ["transactionId", "predError", "value", "f"]

D.

1. where

2. col("transactionId"), col("predError"), col("value"), col("f")

E.

1. select

2. col(["transactionId", "predError", "value", "f"])

Questions # 47:

Which of the following code blocks efficiently converts DataFrame transactionsDf from 12 into 24 partitions?

Options:

A.

transactionsDf.repartition(24, boost=True)

B.

transactionsDf.repartition()

C.

transactionsDf.repartition("itemId", 24)

D.

transactionsDf.coalesce(24)

E.

transactionsDf.repartition(24)

Questions # 48:

Which of the following code blocks returns a single-column DataFrame of all entries in Python list throughputRates which contains only float-type values ?

Options:

A.

spark.createDataFrame((throughputRates), FloatType)

B.

spark.createDataFrame(throughputRates, FloatType)

C.

spark.DataFrame(throughputRates, FloatType)

D.

spark.createDataFrame(throughputRates)

E.

spark.createDataFrame(throughputRates, FloatType())

Questions # 49:

The code block displayed below contains an error. The code block should count the number of rows that have a predError of either 3 or 6. Find the error.

Code block:

transactionsDf.filter(col('predError').in([3, 6])).count()

Options:

A.

The number of rows cannot be determined with the count() operator.

B.

Instead of filter, the select method should be used.

C.

The method used on column predError is incorrect.

D.

Instead of a list, the values need to be passed as single arguments to the in operator.

E.

Numbers 3 and 6 need to be passed as string variables.

Questions # 50:

Which of the following code blocks returns a new DataFrame with only columns predError and values of every second row of DataFrame transactionsDf?

Entire DataFrame transactionsDf:

1.+-------------+---------+-----+-------+---------+----+

2.|transactionId|predError|value|storeId|productId| f|

3.+-------------+---------+-----+-------+---------+----+

4.| 1| 3| 4| 25| 1|null|

5.| 2| 6| 7| 2| 2|null|

6.| 3| 3| null| 25| 3|null|

7.| 4| null| null| 3| 2|null|

8.| 5| null| null| null| 2|null|

9.| 6| 3| 2| 25| 2|null|

10.+-------------+---------+-----+-------+---------+----+

Options:

A.

transactionsDf.filter(col("transactionId").isin([3,4,6])).select([predError, value])

B.

transactionsDf.select(col("transactionId").isin([3,4,6]), "predError", "value")

C.

transactionsDf.filter("transactionId" % 2 == 0).select("predError", "value")

D.

transactionsDf.filter(col("transactionId") % 2 == 0).select("predError", "value")

(Correct)

E.

1.transactionsDf.createOrReplaceTempView("transactionsDf")

2.spark.sql("FROM transactionsDf SELECT predError, value WHERE transactionId % 2 = 2")

F.

transactionsDf.filter(col(transactionId).isin([3,4,6]))

Viewing page 5 out of 6 pages
Viewing questions 41-50 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.