create_table: Create A Table

View source: R/tables.R

create_tableR Documentation

Create A Table

Description

Creates a table, in the hive warehouse, from the given path and returns the corresponding DataFrame. The table will contain the contents of the file that is in the path parameter.

Usage

create_table(sc, table, path, source, ...)

Arguments

sc

A spark_connection.

table

character(1). The name of the table to create.

path

character(1). The path to use to create the table.

source

character(1). The data source to use to create the table such as "parquet", "csv", etc.

...

Additional options to be passed to the createTable method.

Details

The default data source type is parquet. This can be changed using source or setting the configuration option spark.sql.sources.default when creating the spark session using or after you have created the session using

config <- sparklyr::spark_config()
config[["spark.sql.sources.default"]] <- "csv"

Value

A tbl_spark.

See Also

cache_table(), get_table(), list_tables(), refresh_table(), table_exists(), uncache_table()


catalog documentation built on Aug. 23, 2022, 1:07 a.m.