Description Usage Arguments Details Examples
Write to a JDBC table
1 2 3 4 5 6 7 8 9 |
.data |
a |
url |
string, the jdbc URL |
table |
sting, the table name |
mode |
string, either |
partition_by |
string, the column names to partition by |
driver |
string, the driver class to use, e.g. |
... |
additional connection options such as |
connection properties can be set by other named arguments in the ...
JDBC database connection arguments, a list of arbitrary string tag/value. Normally
at least a "user" and "password" property should be included. "batchsize" can be
used to control the number of rows per insert. "isolationLevel" can be one of
"NONE", "READ_COMMITTED", "READ_UNCOMMITTED", "REPEATABLE_READ", or "SERIALIZABLE",
corresponding to standard transaction isolation levels defined by JDBC's Connection
object, with default of "READ_UNCOMMITTED".
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
spark_session_reset(sparkPackages = c("org.postgresql:postgresql:42.2.12"))
iris_tbl <- spark_tbl(iris)
iris_tbl %>%
spark_write_jdbc(url = "jdbc:postgresql://localhost/tidyspark_test",
table = "iris_test",
partition_by = "Species",
mode = "overwrite",
user = "tidyspark_tester", password = "test4life",
driver = "org.postgresql.Driver")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.