LeetQuiz Logo
Privacy Policy•contact@leetquiz.com
© 2025 LeetQuiz All rights reserved.
Databricks Certified Data Engineer - Associate

Databricks Certified Data Engineer - Associate

Get started today

Ultimate access to all questions.


A team of data analysts is working with a table named sales using SQL and seeks assistance from the data engineering team, who primarily use Python in Databricks notebooks. What is the correct method for the data engineers to query the sales table using PySpark?

Real Exam




Explanation:

The correct method to access any table in PySpark is by using the spark.sql("select * from table_name") method, which returns a DataFrame. Therefore, the correct answer is spark.sql("select * from sales").

Powered ByGPT-5