I'm trying to bulk copy a DF with 1.5B rows into a SQL Server table. It's just 5 columns, but the number of rows is massive. I'm trying this method.
import com.microsoft.azure.sqldb.spark.bulkcopy.BulkCopyMetadata
import com.microsoft.azure.sqldb.spark.config.Config
import com.microsoft.azure.sqldb.spark.connect._
val bulkCopyConfig = Config(Map(
"url" -> "mysqlserver.database.windows.net",
"databaseName" -> "MyDatabase",
"user" -> "username",
"password" -> "*********",
"dbTable" -> "dbo.Clients",
"bulkCopyBatchSize" -> "100000",
"bulkCopyTableLock" -> "true",
"bulkCopyTimeout" -> "600"
))
df.bulkCopyToSqlDB(bulkCopyConfig)
I'm following the example from the link below.
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-spark-connector
It keeps running and running, for hours, but never copies anything from the DF to the table. Thoughts? Suggestions? Thanks.
BTW, if I try to copy a much smaller DF, with around 1.5M rows, it works just fine.