if (FALSE) {
sc <- spark_connect(
master = "local",
config = list(
`sparklyr.shell.driver-class-path` = "/usr/share/java/mysql-connector-java-8.0.25.jar"
)
)
spark_write_jdbc(
sdf_len(sc, 10),
name = "my_sql_table",
options = list(
url = "jdbc:mysql://localhost:3306/my_sql_schema",
driver = "com.mysql.jdbc.Driver",
user = "me",
password = "******",
dbtable = "my_sql_table"
)
)
}
Run the code above in your browser using DataLab