nerdexam
Databricks

DATABRICKS-CERTIFIED-DATA-ENGINEER-ASSOCIATE · Question #83

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…

The correct answer is E. spark.table("sales"). Databricks uses a unified metastore, meaning tables registered in SQL are also accessible via PySpark using spark.table('table_name'), which returns a DataFrame. This is the standard PySpark API for loading a named table. SELECT * FROM sales is SQL syntax, not PySpark…

Submitted by stefanr· Apr 18, 2026Databricks Lakehouse Platform

Question

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?

Options

  • ASELECT * FROM sales
  • BThere is no way to share data between PySpark and SQL.
  • Cspark.sql("sales")
  • Dspark.delta.table("sales")
  • Espark.table("sales")

How the community answered

(47 responses)
  • B
    2% (1)
  • C
    4% (2)
  • D
    6% (3)
  • E
    87% (41)

Explanation

Databricks uses a unified metastore, meaning tables registered in SQL are also accessible via PySpark using spark.table('table_name'), which returns a DataFrame. This is the standard PySpark API for loading a named table. SELECT * FROM sales is SQL syntax, not PySpark. spark.sql('sales') is incorrect - spark.sql() requires a full SQL statement string, not just a table name. spark.delta.table() is not a valid PySpark method. The claim that PySpark and SQL cannot share data is false - they share the same metastore and can interoperate seamlessly.

Topics

#PySpark#DataFrames#Data Access#Delta Lake

Community Discussion

No community discussion yet for this question.

Full DATABRICKS-CERTIFIED-DATA-ENGINEER-ASSOCIATE Practice