Databricks Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0

Page:    1 / 84   
Total 420 questions | Updated On: Apr 22, 2024
Question 1

If we want to create a constant integer 1 as a new column ‘new_column’ in a dataframe df, which code block we should select ? 


Answer: A
Question 2

Which of the following code blocks returns a DataFrame with approximately 1,000 rows from the 10,000-row
DataFrame itemsDf, without any duplicates, returning the same rows even if the code
block is run twice?


Answer: B
Question 3

We have an unmanaged table “my_table”
If we run the code block down below
spark.sql(“DROP TABLE IF EXISTS my_table”)
What will happen to data in my_table ?


Answer: A
Question 4

Which of the following 3 DataFrame operations are classified as a wide transformation ? Choose 3 answers: 


Answer:
Question 5

Given an instance of SparkSession named spark, and the following DataFrame named df:
1. val simpleData = Seq(
2. ("James","Sales","NY",90000,34,10000),
3. ("Michael","Sales","NY",86000,56,20000),
4. ("Robert","Sales","CA",81000,30,23000),
5. ("Maria","Finance","CA",90000,24,23000),
6. ("Raman","Finance","CA",99000,40,24000),
7. ("Scott","Finance","NY",83000,36,19000),
8. ("Jen","Finance","NY",79000,53,15000),
9. ("Jeff","Marketing","CA",80000,25,18000),
10. ("Kumar","Marketing","NY",91000,50,21000)
11. )
val df = spark.createDataFrame(simpleData).toDf("employee_name","department","state","salary","age","bonus")
Choose the right code block which will produce the following result:
1. +----------+-----------+
2. |department|sum(salary)
3.
4. +----------+-----------+
5. Sales |257000
6. Finance |351000
7. Marketing |171000
8.
9. +----------+-----------+


Answer: A
Page:    1 / 84   
Total 420 questions | Updated On: Apr 22, 2024

Quickly grab our Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 product now and kickstart your exam preparation today!

Name: Databricks Certified Associate Developer for Apache Spark 3.0
Exam Code: Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0
Certification: Apache Spark Associate Developer
Vendor: Databricks
Total Questions: 420
Last Updated: Apr 22, 2024