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

Posted by Donte on Jun 17, 2026 at 11:26 PM

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?

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


Get Premium Databricks Certified Data Engineer Associate Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
12 comments · newest first
LA
Lauran 2 months ago
I'm leaning towards D. It specifically mentions Delta tables, which is relevant here.
MA
Mary 2 months ago
I agree, but option E could work too. It directly accesses the table.
SH
Shay 3 months ago
I think option C is the best choice. It allows SQL queries in PySpark.
KA
Kayleigh 3 months ago
E) spark.table("sales") is the best option here.
ET
Ethan 3 months ago
B) is definitely wrong, they can share data!
ME
Merissa 3 months ago
Wait, can you really use SQL commands in PySpark?
BR
Britt 3 months ago
I think D) spark.delta.table("sales") could work too.
TR
Tricia 3 months ago
C) spark.sql("sales") is the way to go!
IN
India 4 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.
CO
Cory 4 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.
DO
Dona 4 months ago
I think option E, "spark.table('sales')", sounds familiar from our practice questions on accessing tables in PySpark.
ER
Eric 4 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.
0/2000 characters

Save Cancel