Exam Code: DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK
Exam Name: Databricks Certified Associate Developer for Apache Spark 3.0
Updated:
Q&As: 180
At Passcerty.com, we pride ourselves on the comprehensive nature of our DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK exam dumps, designed meticulously to encompass all key topics and nuances you might encounter during the real examination. Regular updates are a cornerstone of our service, ensuring that our dedicated users always have their hands on the most recent and relevant Q&A dumps. Behind every meticulously curated question and answer lies the hard work of our seasoned team of experts, who bring years of experience and knowledge into crafting these premium materials. And while we are invested in offering top-notch content, we also believe in empowering our community. As a token of our commitment to your success, we're delighted to offer a substantial portion of our resources for free practice. We invite you to make the most of the following content, and wish you every success in your endeavors.
Experience Passcerty.com exam material in PDF version.
Simply submit your e-mail address below to get started with our PDF real exam demo of your Databricks DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK exam.
Instant download
Latest update demo according to real exam
The code block displayed below contains an error. The code block should combine data from DataFrames itemsDf and transactionsDf, showing all rows of DataFrame itemsDf that have a matching value in column itemId with a value in column transactionsId of DataFrame transactionsDf.
Find the error.
Code block:
itemsDf.join(itemsDf.itemId==transactionsDf.transactionId)
A. The join statement is incomplete.
B. The union method should be used instead of join.
C. The join method is inappropriate.
D. The merge method should be used instead of join.
E. The join expression is malformed.
Which of the following code blocks returns a single row from DataFrame transactionsDf?
Full 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.+-------------+---------+-----+-------+---------+----+
A. transactionsDf.where(col("storeId").between(3,25))
B. transactionsDf.filter((col("storeId")!=25) | (col("productId")==2))
C. transactionsDf.filter(col("storeId")==25).select("predError","storeId").distinct()
D. transactionsDf.select("productId", "storeId").where("storeId == 2 OR storeId != 25")
E. transactionsDf.where(col("value").isNull()).select("productId", "storeId").distinct()
Which of the following code blocks returns DataFrame transactionsDf sorted in descending order by column predError, showing missing values last?
A. transactionsDf.sort(asc_nulls_last("predError"))
B. transactionsDf.orderBy("predError").desc_nulls_last()
C. transactionsDf.sort("predError", ascending=False)
D. transactionsDf.desc_nulls_last("predError")
E. transactionsDf.orderBy("predError").asc_nulls_last()
Which of the following code blocks returns a copy of DataFrame transactionsDf in which column productId has been renamed to productNumber?
A. transactionsDf.withColumnRenamed("productId", "productNumber")
B. transactionsDf.withColumn("productId", "productNumber")
C. transactionsDf.withColumnRenamed("productNumber", "productId")
D. transactionsDf.withColumnRenamed(col(productId), col(productNumber))
E. transactionsDf.withColumnRenamed(productId, productNumber)
The code block displayed below contains an error. The code block is intended to perform an outer join of
DataFrames transactionsDf and itemsDf on columns productId and itemId, respectively.
Find the error.
Code block:
transactionsDf.join(itemsDf, [itemsDf.itemId, transactionsDf.productId], "outer")
A. The "outer" argument should be eliminated, since "outer" is the default join type.
B. The join type needs to be appended to the join() operator, like join().outer() instead of listing it as the last argument inside the join() call.
C. The term [itemsDf.itemId, transactionsDf.productId] should be replaced by itemsDf.itemId == transactionsDf.productId.
D. The term [itemsDf.itemId, transactionsDf.productId] should be replaced by itemsDf.col("itemId") == transactionsDf.col("productId").
E. The "outer" argument should be eliminated from the call and join should be replaced by joinOuter.
Viewing Page 1 of 3 pages. Download PDF or Software version with 180 questions