Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot write 2MB data into cosmos with bulkImport #431

Open
yuzhangyi opened this issue Dec 30, 2020 · 0 comments
Open

Cannot write 2MB data into cosmos with bulkImport #431

yuzhangyi opened this issue Dec 30, 2020 · 0 comments

Comments

@yuzhangyi
Copy link

Hi, @FabianMeiswinkel,

   In cosmos-spark-connector, it seems like we cannot write 2MB data as single document into cosmos with bulkimport. After reading the source code https://github.com/Azure/azure-cosmosdb-spark/blob/1247559cae6b843a1ddc9fae9827222578abd42d/src/main/scala/com/microsoft/azure/cosmosdb/spark/CosmosDBSpark.scala#L153,  we must use option "MaxMiniBatchImportSizeKB" to let customer set the value, otherwise the max size is 100KB. 

  val maxMiniBatchImportSizeKB: Int = writeConfig.get[String](CosmosDBConfig.MaxMiniBatchImportSizeKB)
  .getOrElse(CosmosDBConfig.DefaultMaxMiniBatchImportSizeKB.toString)
  .toInt

As I know, the max size of per document in cosmos DB is 2MB, if the customer set big value on "MaxMiniBatchImportSizeKB", what will happen? At the same time, could we make the default value of "DefaultMaxMiniBatchImportSizeKB" as 2048?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant