3
残念ですが、既存のDataFrame "df"をMySQLテーブルに書き込む手順を説明できるかどうかは、 "product_mysql"と逆です。MySQLテーブルにDataFrameを書き込む方法
残念ですが、既存のDataFrame "df"をMySQLテーブルに書き込む手順を説明できるかどうかは、 "product_mysql"と逆です。MySQLテーブルにDataFrameを書き込む方法
あなたの助けのラムのためのthis databricks article : Connecting to SQL Databases using JDBC.
import org.apache.spark.sql.SaveMode
val df = spark.table("...")
println(df.rdd.partitions.length)
// given the number of partitions above, users can reduce the partition value by calling coalesce() or increase it by calling repartition() to manage the number of connections.
df.repartition(10).write.mode(SaveMode.Append).jdbc(jdbcUrl, "product_mysql", connectionProperties)
感謝を参照してください! – adarsh16