Description Usage Arguments Details Value Note Examples
Creates a table based on the dataset in a data source. Returns a SparkDataFrame associated with the table.
1 |
tableName |
the qualified or unqualified name that designates a table. If no database identifier is provided, it refers to a table in the current database. |
path |
(optional) the path of files to load. |
source |
(optional) the name of the data source. |
schema |
(optional) the schema of the data required for some data sources. |
... |
additional named parameters as options for the 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. When a path
is specified, an external table is
created from the data at the given path. Otherwise a managed table is created.
A SparkDataFrame.
createTable since 2.2.0
1 2 3 4 5 6 7 8 | ## Not run:
sparkR.session()
df <- createTable("myjson", path="path/to/json", source="json", schema)
createTable("people", source = "json", schema = schema)
insertInto(df, "people")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.