cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

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.

1 ACCEPTED SOLUTION

Accepted Solutions

User16826993570
New Contributor III

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

4 REPLIES 4

User16826993570
New Contributor III

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

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

Kaniz_Fatma
Community Manager
Community Manager

Hi @Mohammad Saberโ€‹ โ€‹, We havenโ€™t heard from you since the last response from @Kedar Deshpandeโ€‹ , and I was checking back to see if you have a resolution yet.

If you have any solution, please share it with the community as it can be helpful to others. Otherwise, we will respond with more details and try to help.

Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.

Mado
Valued Contributor II

Hi @Kaniz Fatmaโ€‹ 

I selected answer from @Kedar Deshpandeโ€‹ as the best answer.

Kaniz_Fatma
Community Manager
Community Manager

Thank you, @Mohammad Saberโ€‹, for selecting the best answer for our community!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group