简体   繁体   English

当我在 AWS EMR Studio 中使用 saveAsTable 保存 PySpark DataFrame 时,它​​会保存在哪里?

[英]When I save a PySpark DataFrame with saveAsTable in AWS EMR Studio, where does it get saved?

我可以使用 df.write.saveAsTable('tableName') 保存数据框并使用spark.table('tableName') df.write.saveAsTable('tableName')读取后续表,但我不确定表实际保存在哪里?

It is stored under the default location of your database.它存储在数据库的默认位置下。

You can get the location by running the following spark sql query:您可以通过运行以下 spark sql 查询来获取位置:

spark.sql("DESCRIBE TABLE EXTENDED tableName")<\/code>

You can find the Location<\/code> under the # Detailed Table Information<\/code> section.您可以在# Detailed Table Information<\/code>部分下找到Location<\/code> 。 Please find a sample output below:请在下面找到示例输出: 在此处输入图像描述<\/a>

"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM