Which of the following describes Spark's Adaptive Query Execution?
A. Adaptive Query Execution features include dynamically coalescing shuffle partitions, dynamically injecting scan filters, and dynamically optimizing skew joins.Which of the following code blocks writes DataFrame itemsDf to disk at storage location filePath, making sure to substitute any existing data at that location?
A. itemsDf.write.mode("overwrite").parquet(filePath)Which of the following statements about Spark's configuration properties is incorrect?
A. The maximum number of tasks that an executor can process at the same time is controlled by the spark.task.cpus property.Which of the following code blocks returns a DataFrame that has all columns of DataFrame transactionsDf and an additional column predErrorSquared which is the squared value of column predError in DataFrame transactionsDf?
A. transactionsDf.withColumn("predError", pow(col("predErrorSquared"), 2))Which of the following describes a way for resizing a DataFrame from 16 to 8 partitions in the most efficient way?
A. Use operation DataFrame.repartition(8) to shuffle the DataFrame and reduce the number of partitions.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"))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.+------+-----------------------------+-------------------+
A. 1.itemsDfSchema = StructType([ 2. StructField("itemId", IntegerType()), 3. StructField("attributes", StringType()), 4. StructField("supplier", StringType())]) 5. 6.itemsDf = spark.read.schema(itemsDfSchema).parquet(filePath)The code block displayed below contains an error. The code block should save DataFrame transactionsDf at path path as a parquet file, appending to any existing parquet file. Find the error.
Code block:
A. transactionsDf.format("parquet").option("mode", "append").save(path)The code block shown below should return a copy of DataFrame transactionsDf with an added column cos. This column should have the values in column value converted to degrees and having the cosine of those converted values taken,
rounded to two decimals. Choose the answer that correctly fills the blanks in the code block to accomplish this.
Code block:
transactionsDf.__1__(__2__, round(__3__(__4__(__5__)),2))
A. 1. withColumn 2. col("cos") 3. cos 4. degrees 5. transactionsDf.valueWhich of the following code blocks uses a schema fileSchema to read a parquet file at location filePath into a DataFrame?
A. spark.read.schema(fileSchema).format("parquet").load(filePath)Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Databricks exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK exam preparations and Databricks certification application, do not hesitate to visit our Vcedump.com to find your solutions here.