| insertTableSpark | R Documentation |
Uploads a local data frame to Spark/Databricks using multi-row
INSERT INTO ... VALUES (...), (...), ... statements. This is the same
mechanism insertTable() now uses by default on Spark, so you only need
insertTableSpark() directly when you want to tune batchSize. Multi-row
VALUES inserts are dramatically faster than the INSERT ... SELECT ... UNION ALL approach Spark's planner struggles with (benchmarked ~50x faster
at 1000 rows).
insertTableSpark(cdm, name, table, overwrite = TRUE, batchSize = 5000L)
cdm |
A |
name |
Name of the destination table (single character). |
table |
A local data frame to upload. |
overwrite |
If |
batchSize |
Number of rows per |
Only intended for Spark connections. For other dialects use
insertTable().
A cdm_table referencing the newly inserted table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.