I can save a dataframe using df.write.saveAsTable('tableName') and read the subsequent table with spark.table('tableName') but I'm not sure where the table is actually getting saved?
Asked
Active
Viewed 275 times
1
Tom
- 11
- 1
-
2you can probably check the definition of your table to see where the data are stored. – Steven Aug 24 '21 at 14:02
1 Answers
1
It is stored under the default location of your database.
You can get the location by running the following spark sql query:
spark.sql("DESCRIBE TABLE EXTENDED tableName")
You can find the Location under the # Detailed Table Information section.
Please find a sample output below:

Sima
- 11
- 2