1 / 11

Databricks Certified Associate Developer for Apache Spark 3.0 Exam Questions

PassQuestion provides the latest Databricks Certified Associate Developer for Apache Spark 3.0 Exam Questions to help you understand the topics of your exam easily.

Download Presentation

Databricks Certified Associate Developer for Apache Spark 3.0 Exam Questions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Databricks Certified Associate Databricks Certified Associate Developer for Apache Spark 3.0 Developer for Apache Spark 3.0 Free Questions Free Questions Databricks Certified Associate Developer for Databricks Certified Associate Developer for Apache Spark 3.0 Apache Spark 3.0 https://www.passquestion.com/ https://www.passquestion.com/Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0.html .html

  2. Question 1 Question 1 Which of the following code blocks silently writes DataFrame itemsDf in avro format to Which of the following code blocks silently writes DataFrame itemsDf in avro format to location fileLocation if a file does not yet exist at that location? location fileLocation if a file does not yet exist at that location? A. itemsDf.write.avro(fileLocation) A. itemsDf.write.avro(fileLocation) B. itemsDf.write.format("avro").mode("ignore").save(fileLocation) B. itemsDf.write.format("avro").mode("ignore").save(fileLocation) C. itemsDf.write.format("avro").mode("errorifexists").save(fileLocation) C. itemsDf.write.format("avro").mode("errorifexists").save(fileLocation) D. itemsDf.save.format("avro").mode("ignore").write(fileLocation) D. itemsDf.save.format("avro").mode("ignore").write(fileLocation) E. spark.DataFrameWriter(itemsDf).format("avro").write(fileLocation) E. spark.DataFrameWriter(itemsDf).format("avro").write(fileLocation) Answer: A Answer: A

  3. Question 2 Question 2 Which of the elements that are labeled with a circle and a number contain an error or are Which of the elements that are labeled with a circle and a number contain an error or are misrepresented? misrepresented? A. 1, 10 A. 1, 10 B. 1, 8 B. 1, 8 C. 10 C. 10 D. 7, 9, 10 D. 7, 9, 10 E. 1, 4, 6, 9 E. 1, 4, 6, 9 Answer: B Answer: B

  4. Question 3 Question 3 Which of the following code blocks displays the 10 rows with the smallest values of column value in Which of the following code blocks displays the 10 rows with the smallest values of column value in DataFrame transactionsDf in a nicely formatted way? DataFrame transactionsDf in a nicely formatted way? A. transactionsDf.sort(asc(value)).show(10) A. transactionsDf.sort(asc(value)).show(10) B. transactionsDf.sort(col("value")).show(10) B. transactionsDf.sort(col("value")).show(10) C. transactionsDf.sort(col("value").desc()).head() C. transactionsDf.sort(col("value").desc()).head() D. transactionsDf.sort(col("value").asc()).print(10) D. transactionsDf.sort(col("value").asc()).print(10) E. transactionsDf.orderBy("value").asc().show(10) E. transactionsDf.orderBy("value").asc().show(10) Answer: B Answer: B

  5. Question 4 Question 4 Which of the following code blocks can be used to save DataFrame transactionsDf to memory only, Which of the following code blocks can be used to save DataFrame transactionsDf to memory only, recalculating partitions that do not fit in memory when they are needed? recalculating partitions that do not fit in memory when they are needed? A. from pyspark import StorageLevel transactionsDf.cache(StorageLevel.MEMORY_ONLY) A. from pyspark import StorageLevel transactionsDf.cache(StorageLevel.MEMORY_ONLY) B. transactionsDf.cache() B. transactionsDf.cache() C. transactionsDf.storage_level('MEMORY_ONLY') C. transactionsDf.storage_level('MEMORY_ONLY') D. transactionsDf.persist() D. transactionsDf.persist() E. transactionsDf.clear_persist() E. transactionsDf.clear_persist() F. from pyspark import StorageLevel transactionsDf.persist(StorageLevel.MEMORY_ONLY) F. from pyspark import StorageLevel transactionsDf.persist(StorageLevel.MEMORY_ONLY) Answer: F Answer: F

  6. Question 5 Question 5 Which of the following is a viable way to improve Spark's performance when dealing with large Which of the following is a viable way to improve Spark's performance when dealing with large amounts of data, given that there is only a single application running on the cluster? amounts of data, given that there is only a single application running on the cluster? A. Increase values for the properties spark.default.parallelism and spark.sql.shuffle.partitions A. Increase values for the properties spark.default.parallelism and spark.sql.shuffle.partitions B. Decrease values for the properties spark.default.parallelism and spark.sql.partitions B. Decrease values for the properties spark.default.parallelism and spark.sql.partitions C. Increase values for the properties spark.sql.parallelism and spark.sql.partitions C. Increase values for the properties spark.sql.parallelism and spark.sql.partitions D. Increase values for the properties spark.sql.parallelism and spark.sql.shuffle.partitions D. Increase values for the properties spark.sql.parallelism and spark.sql.shuffle.partitions E. Increase values for the properties spark.dynamicAllocation.maxExecutors, E. Increase values for the properties spark.dynamicAllocation.maxExecutors, spark.default.parallelism, and spark.sql.shuffle.partitions spark.default.parallelism, and spark.sql.shuffle.partitions Answer: A Answer: A

  7. Question 6 Question 6 Which of the following is the deepest level in Spark's execution hierarchy? Which of the following is the deepest level in Spark's execution hierarchy? A. Job A. Job B. Task B. Task C. Executor C. Executor D. Slot D. Slot E. Stage E. Stage Answer: B Answer: B

  8. Question 7 Question 7 Which of the following code blocks returns all unique values across all values in columns value and productId in Which of the following code blocks returns all unique values across all values in columns value and productId in DataFrame transactionsDf in a one-column DataFrame? DataFrame transactionsDf in a one-column DataFrame? A. tranactionsDf.select('value').join(transactionsDf.select('productId'), col('value')==col('productId'), 'outer') A. tranactionsDf.select('value').join(transactionsDf.select('productId'), col('value')==col('productId'), 'outer') B. transactionsDf.select(col('value'), col('productId')).agg({' B. transactionsDf.select(col('value'), col('productId')).agg({'* *': 'count'}) C. transactionsDf.select('value', 'productId').distinct() C. transactionsDf.select('value', 'productId').distinct() D. transactionsDf.select('value').union(transactionsDf.select('productId')).distinct() D. transactionsDf.select('value').union(transactionsDf.select('productId')).distinct() E. transactionsDf.agg({'value': 'collect_set', 'productId': 'collect_set'}) E. transactionsDf.agg({'value': 'collect_set', 'productId': 'collect_set'}) Answer: D Answer: D ': 'count'})

  9. Question 8 Question 8 Which of the following code blocks returns a DataFrame showing the mean value of column "value" Which of the following code blocks returns a DataFrame showing the mean value of column "value" of DataFrame transactionsDf, grouped by its column storeId? of DataFrame transactionsDf, grouped by its column storeId? A. transactionsDf.groupBy(col(storeId).avg()) A. transactionsDf.groupBy(col(storeId).avg()) B. transactionsDf.groupBy("storeId").avg(col("value")) B. transactionsDf.groupBy("storeId").avg(col("value")) C. transactionsDf.groupBy("storeId").agg(avg("value")) C. transactionsDf.groupBy("storeId").agg(avg("value")) D. transactionsDf.groupBy("storeId").agg(average("value")) D. transactionsDf.groupBy("storeId").agg(average("value")) E. transactionsDf.groupBy("value").average() E. transactionsDf.groupBy("value").average() Answer: C Answer: C

  10. Question 9 Question 9 The code block displayed below contains an error. The code block should produce a DataFrame with The code block displayed below contains an error. The code block should produce a DataFrame with color as the only column and three rows with color values of red, blue, and green, respectively. color as the only column and three rows with color values of red, blue, and green, respectively. Find the error. Find the error. Code block: Code block: 1.spark.createDataFrame([("red",), ("blue",), ("green",)], "color") 1.spark.createDataFrame([("red",), ("blue",), ("green",)], "color") Instead of calling spark.createDataFrame, just DataFrame should be called. Instead of calling spark.createDataFrame, just DataFrame should be called. A. The commas in the tuples with the colors should be eliminated. A. The commas in the tuples with the colors should be eliminated. B. The colors red, blue, and green should be expressed as a simple Python list, and not a list of tuples. B. The colors red, blue, and green should be expressed as a simple Python list, and not a list of tuples. C. Instead of color, a data type should be specified. C. Instead of color, a data type should be specified. D. The "color" expression needs to be wrapped in brackets, so it reads ["color"]. D. The "color" expression needs to be wrapped in brackets, so it reads ["color"]. Answer: D Answer: D

  11. Question 10 Question 10 Which of the following code blocks stores DataFrame itemsDf in executor memory and, if Which of the following code blocks stores DataFrame itemsDf in executor memory and, if insufficient memory is available, serializes it and saves it to disk? insufficient memory is available, serializes it and saves it to disk? A. itemsDf.persist(StorageLevel.MEMORY_ONLY) A. itemsDf.persist(StorageLevel.MEMORY_ONLY) B. itemsDf.cache(StorageLevel.MEMORY_AND_DISK) B. itemsDf.cache(StorageLevel.MEMORY_AND_DISK) C. itemsDf.store() C. itemsDf.store() D. itemsDf.cache() D. itemsDf.cache() E. itemsDf.write.option('destination', 'memory').save() E. itemsDf.write.option('destination', 'memory').save() Answer: D Answer: D

More Related