Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Databricks Certified Data Engineer Associate Exam - Topic 2 Question 66 Discussion

A data analyst has created a Delta table sales that is used by the entire data analysis team. They want help from the data engineering team to implement a series of tests to ensure the data is clean. However, the data engineering team uses Python for its tests rather than SQL.Which of the following commands could the data engineering team use to access sales in PySpark?
E) spark.table('sales')
A) SELECT * FROM sales
B) There is no way to share data between PySpark and SQL.
C) spark.sql('sales')
D) spark.delta.table('sales')

Databricks Certified Data Engineer Associate Exam - Topic 2 Question 66 Discussion

Actual exam question for Databricks's Databricks Certified Data Engineer Associate exam
Question #: 66
Topic #: 2
[All Databricks Certified Data Engineer Associate Questions]

A data analyst has created a Delta table sales that is used by the entire data analysis team. They want help from the data engineering team to implement a series of tests to ensure the data is clean. However, the data engineering team uses Python for its tests rather than SQL.

Which of the following commands could the data engineering team use to access sales in PySpark?

Show Suggested Answer Hide Answer
Suggested Answer: E

The data engineering team can use thespark.tablemethod to access the Delta tablesalesin PySpark. This method returns a DataFrame representation of the Delta table, which can be used for further processing or testing.Thespark.tablemethod works for any table that is registered in the Hive metastore or the Spark catalog, regardless of the file format1.Alternatively, the data engineering team can also use theDeltaTable.forPathmethod to load the Delta table from its path2.Reference:1:SparkSession | PySpark 3.2.0 documentation2:Welcome to Delta Lake's Python documentation page --- delta-spark 2.4.0 documentation


Contribute your Thoughts:

0/2000 characters
Lauran
22 days ago
I'm leaning towards D. It specifically mentions Delta tables, which is relevant here.
upvoted 0 times
...
Mary
27 days ago
I agree, but option E could work too. It directly accesses the table.
upvoted 0 times
...
Shay
1 month ago
I think option C is the best choice. It allows SQL queries in PySpark.
upvoted 0 times
...
Kayleigh
1 month ago
E) spark.table("sales") is the best option here.
upvoted 0 times
...
Ethan
1 month ago
B) is definitely wrong, they can share data!
upvoted 0 times
...
Merissa
2 months ago
Wait, can you really use SQL commands in PySpark?
upvoted 0 times
...
Britt
2 months ago
I think D) spark.delta.table("sales") could work too.
upvoted 0 times
...
Tricia
2 months ago
C) spark.sql("sales") is the way to go!
upvoted 0 times
...
India
2 months ago
I feel like I’ve seen "spark.sql('sales')" used before, but I’m not entirely sure if it’s the best choice for accessing a Delta table.
upvoted 0 times
...
Cory
2 months ago
I'm a bit confused about whether "spark.delta.table('sales')" is the correct command since I thought Delta tables had specific methods.
upvoted 0 times
...
Dona
2 months ago
I think option E, "spark.table('sales')", sounds familiar from our practice questions on accessing tables in PySpark.
upvoted 0 times
...
Eric
3 months ago
I remember that PySpark can interact with SQL tables, but I'm not sure if "spark.sql" is the right way to access the Delta table.
upvoted 0 times
...

Save Cancel