
Explanation:
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
Ultimate access to all questions.
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
No comments yet.