
Answer-first summary for fast verification
Answer: spark.table("employees")
The `spark.table()` function is used to return the specified Spark SQL table as a PySpark DataFrame. This is the correct method to query a Delta table created in Spark SQL from PySpark. Reference: [Spark Apache Documentation](https://spark.apache.org/docs/2.4.0/api/python/_modules/pyspark/sql/session.html#SparkSession.table)
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Which command in PySpark allows you to query the Delta table named 'employees' that was created in Spark SQL?
A
spark.table("employees")
B
pyspark.sql.read(SELECT * FROM employees)
C
spark.format("sql").read("employees")
D
spark.sql("employees")
E
Spark SQL tables can not be accessed from PySpark