createExternalTable {SparkR} | R Documentation |
Creates an external table based on the dataset in a data source, Returns the DataFrame associated with the external table.
createExternalTable(sqlContext, tableName, path = NULL, source = NULL, ...)
sqlContext |
SQLContext to use |
tableName |
A name of the table |
path |
The path of files to load |
source |
the name of external data source |
The data source is specified by the 'source' and a set of options(...). If 'source' is not specified, the default data source configured by "spark.sql.sources.default" will be used.
DataFrame
## Not run: sc <- sparkR.init() sqlContext <- sparkRSQL.init(sc) df <- sparkRSQL.createExternalTable(sqlContext, "myjson", path="path/to/json", source="json") ## End(Not run)