Description Usage Arguments See Also Examples
Write a Spark DataFrame to Treasure Data
1 2 |
x |
A Spark DataFrame or dplyr operation |
name |
The name to write table. |
mode |
A |
options |
A list of strings with additional options. |
partition_by |
A |
... |
Optional arguments; currently unused. |
Other Spark serialization routines: spark_execute_td_presto
,
spark_read_td_presto
,
spark_read_td_query
,
spark_read_td
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
config <- spark_config()
config$spark.td.apikey <- Sys.getenv("TD_API_KEY")
config$spark.serializer <- "org.apache.spark.serializer.KryoSerializer"
config$spark.sql.execution.arrow.enabled <- "true"
sc <- spark_connect(master = "local", config = config)
spark_mtcars <- dplyr::copy_to(sc, mtcars, "spark_mtcars", overwrite = TRUE)
spark_write_td(
spark_mtcars,
name = "mydb.mtcars",
mode = "overwrite"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.