Visit Official SkillCertPro Website :-
Databricks Spark Developer 3.0 Exam Dumps 2022
For a full set of 400+ questions. Go to
https://skillcertpro.com/product/databricks-spark-developer-3-0-exam-questions/
SkillCertPro offers detailed explanations to each question which helps to understand the concepts better.
It is recommended to score above 85% in SkillCertPro exams before attempting a real exam.
SkillCertPro updates exam questions every 2 weeks.
You will get life time access and life time free updates
SkillCertPro assures 100% pass guarantee in first attempt.
Question 1:
What is the purpose of the COALESCE hint?
A. There is no such hint in Spark
B. They can be used for performance tuning and reducing the number of output files
C. They can be used for reducing the number of input files for the read operation.
D. None of the above
Answer: B
Explanation:
https://spark.apache.org/docs/latest/sql-performance-tuning.html#coalesce-hints-for-sql-queries
Question 2:
This feature enables Spark driver to request more or fewer compute resources as the demand of large workloads flows.
A. Adaptive Query Optimization
B. Dynamic resource allocation
C. Setting up a higher number of executors using spark-submit
D. All of the above
Answer: B
Explanation:
https://spark.apache.org/docs/latest/configuration.html#dynamic-allocation
Question 3:
The amount of memory available to each executor is controlled by
A. spark.memory.offHeap.size
B. spark.executor.memory
C. spark.driver.memory
D. spark.worker.memory
Answer: B
Explanation:
https://spark.apache.org/docs/latest/configuration.html#application-properties
Question 4:
Which of the following DataFrame methods are not actions.
A. cache()
B. printSchema()
C. as()
D. foreach()
E. head()
F. sample()
Answer: A, B, C
Explanation:
Spark also offers some utility methods and functions other than transformations and actions. The method cache(), printSchema() are utility methods and they do not trigger a Spark job.
Question 5:
Given the following Data Frame definition.
df = spark.range(500).toDF(“number”)
Choose the incorrect expression
A. df.select("number" + 10)
B. df.select(df["number"] + 10)
C. df.select(expr("number + 10"))
D. df.select(col("number") + 10)
Answer: A
Explanation:
df.select(“number” + 10) is incorrect because the select() transformation does not accept an expression. You must explicitly use the expr() function if you wanted to create column expressions.
For a full set of 400+ questions. Go to
https://skillcertpro.com/product/databricks-spark-developer-3-0-exam-questions/
SkillCertPro offers detailed explanations to each question which helps to understand the concepts better.
It is recommended to score above 85% in SkillCertPro exams before attempting a real exam.
SkillCertPro updates exam questions every 2 weeks.
You will get life time access and life time free updates
SkillCertPro assures 100% pass guarantee in first attempt.
Question 6:
The code block below contains an error. Identify the correct error.
A. df.select("name", "if(salary < 5000, salary * 0.20 , 0) as increment")
B. The if expression is formulated incorrectly. Change the if expression to the following to fix the error.
C. df.select("name", "if(salary < 5000) then salary * 0.20 else 0 end as increment")
D. The select() method does not accept column expression. You can fix the error by changing the select() to selectExpr().
E. Spark does not support if statement. You can change the if statement to the case statement and fix the problem.
F. None of the above
Answer: D
Explanation:
The select() method does not accept column expression. You can fix the error by changing the select() to selectExpr() or you can also fix it by applying expr() function.
Question 7:
Which of the following code blocks returns a DataFrame with a new column salary_increment and all previously existing columns.
A. df.withColumn("salary_increment", "salary * 0.15")
B. df.select("*", expr("salary * 0.15").alias("salary_increment"))
C. df.selectExpr("*", expr("salary * 0.15").alias("salary_increment"))
D. All of the above
Answer: B
Explanation:
The selectExpr() accepts only column name or column expression. You cannot use expr() the method inside selectExpr(). However, the same thing is allowed in the select()method.
Question 8:
Which DataFrame transform will you apply for deleting three columns from your existing DataFrame?
A. del()
B. remove()
C. drop()
D. delete()
Answer: C
Explanation:
We can drop multiple columns by passing in multiple columns as arguments to the drop() method.
Question 9:
Which DataFrame transform will you apply for changing the name of a column in your existing DataFrame?
A. withColumnRenamed("newName", "oldName")
B. withColumnRenamed("oldName", "newName")
C. withColumnRename("newName", "oldName")
D. withColumnRename("oldName", "newName")
Answer: B
Explanation:
The correct format is withColumnRenamed(“oldName”, “newName”)
Question 10:
Which function will you use to add a new field in your DataFrame with a current timestamp?
A. df.withColumn("now", timestamp())
B. df.withColumn("now", current_timestamp())
C. df.select(current_timestamp())
D. df.withColumn("now", now())
Answer: B
Explanation:
The current_timestamp() function is useful for getting the time now.
For a full set of 400+ questions. Go to
https://skillcertpro.com/product/databricks-spark-developer-3-0-exam-questions/
SkillCertPro offers detailed explanations to each question which helps to understand the concepts better.
It is recommended to score above 85% in SkillCertPro exams before attempting a real exam.
SkillCertPro updates exam questions every 2 weeks.
You will get life time access and life time free updates
SkillCertPro assures 100% pass guarantee in first attempt.