Difference between "spark.table" & "spark.read.table"?

Mado
Valued Contributor II

Hi,

I want to make a PySpark DataFrame from a Table. I would like to ask about the difference of the following commands:

spark.read.table(TableName)

&

spark.table(TableName)

Both return PySpark DataFrame and look similar. Thanks.

User16826993570
Databricks Employee
Databricks Employee

There is no difference between spark.table & spark.read.table function.

Inside of spark.read.table is again calling spark.table function.

View solution in original post

Mado
Valued Contributor II

Hi @Kaniz Fatma​ 

I selected answer from @Kedar Deshpande​ as the best answer.