Below is an example of how the batching would work in this situation prior to implementing it on the data.
This solution was determined using a MySQL database with JDBC connector.
This example queries a table with country IDs that have multiple detail records for cities within each country. (select country_id, city from citytable order by country_id)
For this example, link Element = CountryID and max rows = 10.
With batch count= 1, the data was processed in 6 Atomsphere documents. Each document
contained all of the detail records for a single country ID.
With batch count= 2, the data was processed in 3 Atomsphere documents. Each document
contained all of the detail records for 2 country IDs (e.g. 1 and 2 in the first
document, 3 and 4 in the second document, 5 and 6 in the third document).
When batch count is set to 6 or higher, all of the data is processed in 1 Atomsphere document.
In all cases, the data was grouped appropriately and no records were missing for a countryID.
So even though the max rows was set to 10, all 13 records for countryID were returned in every case.