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.
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
createTablemethod.
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"