register_temp_view: Create or replace a temporary view

Description Usage Arguments Examples

View source: R/spark.R

Description

similar to Spark's createOrReplaceTemporaryView method, this function registers the DAG at a given point in the lineage as a temp view in the hive metastore. It does not cache the data, but the name supplied can be used in future Spark SQL queries.

Usage

1

Arguments

.data

a spark_tbl to be registered

name

a string of the name to store the table as

Examples

1
2
3
4
5
6
## Not run: 
spark_tbl(iris) %>% register_temp_view("iris")
iris_preview <- spark_sql("SELECT * FROM iris LIMIT 10")
iris_preview %>% collect

## End(Not run)

danzafar/tidyspark documentation built on Sept. 30, 2020, 12:19 p.m.