What is the difference between createTempview and createGlobaltempview and CreateorReplaceTempview in spark 2.1 ??
Difference between createTempview and createGlobaltempview and CreateorReplaceTempview in spark 2.1?
Asked
Active
Viewed 6,838 times
3
zero323
- 322,348
- 103
- 959
- 935
Manikandan Balasubramanian
- 1,079
- 4
- 14
- 27
1 Answers
1
Global Temporary View
As per documentation, global temporary view are views that are shared among all the sessions, untill all the Spark Application terminates.
createorReplaceTempview
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
Rajat Mishra
- 3,635
- 4
- 27
- 41