Want to pass your Databricks Certified Associate Developer for Apache Spark 3.0 DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK exam in the very first attempt? Try Pass2lead! It is equally effective for both starters and IT professionals.
VCE
Which of the following describes tasks?
A. A task is a command sent from the driver to the executors in response to a transformation.
B. Tasks transform jobs into DAGs.
C. A task is a collection of slots.
D. A task is a collection of rows.
E. Tasks get assigned to the executors by the driver.
Which of the following code blocks returns a single-row DataFrame that only has a column corr which shows the Pearson correlation coefficient between columns predError and value in DataFrame transactionsDf?
A. transactionsDf.select(corr(["predError", "value"]).alias("corr")).first()
B. transactionsDf.select(corr(col("predError"), col("value")).alias("corr")).first()
C. transactionsDf.select(corr(predError, value).alias("corr"))
D. transactionsDf.select(corr(col("predError"), col("value")).alias("corr"))
E. transactionsDf.select(corr("predError", "value"))
Which of the following code blocks returns a 2-column DataFrame that shows the distinct values in column productId and the number of rows with that productId in DataFrame transactionsDf?
A. transactionsDf.count("productId").distinct()
B. transactionsDf.groupBy("productId").agg(col("value").count())
C. transactionsDf.count("productId")
D. transactionsDf.groupBy("productId").count()
E. transactionsDf.groupBy("productId").select(count("value"))