Spark 2.1中的createTempview和createGlobaltempview与CreateorReplaceTempview之间的区别? [英] Difference between createTempview and createGlobaltempview and CreateorReplaceTempview in spark 2.1?

查看:1119
本文介绍了Spark 2.1中的createTempview和createGlobaltempview与CreateorReplaceTempview之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

spark 2.1中createTempviewcreateGlobaltempviewCreateorReplaceTempview有什么区别?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆