Exploring SQLServerBulkCopy JDBC from Spring Batch to copy millions of records from Azure SQL to SQL server installed on Azure VM
Source is SQL view and Destination is SQL table
Batchsize = 250k and Count of records = 20Million
Question is related to reading from source. As batch size is 250K , it is not going to read entire 20Million into memory. But wondering how it works internally
- Is it going to make 80 calls (20Million/250K) to source database?
- If above one is true , how is it going to keep track of records read with out providing sort key in the code. Sample below or i searched for other samples, no where i found sort key has to be given for batch size to work. Everywhere batchsize impacts on writes to destination is mentioned but not on reads
- Can streaming be enabled in above SQL server to SQL server scenario?
I searched a lot finding answer for #1 , but could not find good information. Any insights is very helpful. Thanks!