简体   繁体   English

在Spark SqlContext中覆盖表

[英]Overwrite table in Spark SqlContext

What is the recommended way to overwrite a table in Spark SqlContext? 在Spark SqlContext中覆盖表的推荐方法是什么? Is it OK to directly call 可以直接打电话吗

modified_df.registerTempTable("same_table_name")

without dropping the table in sqlContext? 不用在sqlContext中删除表?

Best practice would likely be to explicitly drop the table to avoid confusion. 最佳实践可能是显式删除表以避免混淆。 But, the above code will overwrite the table as you would expect. 但是,上面的代码将按您期望的那样覆盖该表。

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

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