Spark 2.1中的createTempview和createGlobaltempview与CreateorReplaceTempview之间的区别? [英] Difference between createTempview and createGlobaltempview and CreateorReplaceTempview in spark 2.1?
问题描述
spark 2.1中createTempview
和createGlobaltempview
和CreateorReplaceTempview
有什么区别?
What is the difference between createTempview
and createGlobaltempview
and CreateorReplaceTempview
in spark 2.1 ??
推荐答案
全局临时视图
根据文档,全局临时视图是在所有会话之间共享的视图,直到所有Spark应用程序终止.
As per documentation, global temporary view are views that are shared among all the sessions, untill all the Spark Application terminates.
createorReplaceTempview
createTempView
(或更合适的是createOrReplaceTempView
)来代替registerTempTable
,后者在2.0中已弃用. createTempView
在使用中创建对Dataframe
的内存引用.此操作的生命周期与Dataframe
在其中创建
createTempView
(or more appropriately createOrReplaceTempView
) has been introduced in Spark 2.0 to replace registerTempTable
, which has been deprecated in 2.0. createTempView
creates an in memory reference to the Dataframe
in use. The lifetime for this is tied to the spark session in which the Dataframe
was created in
这篇关于Spark 2.1中的createTempview和createGlobaltempview与CreateorReplaceTempview之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!