I'm having a lot of issues migrating a localhost Cosmos DB database hosted in the Cosmos DB Emulator to an online Cosmos DB instance on Azure. I have used Microsoft's data migration tool to upload the current database, converted to JSON files, to a storage account, and using a Data Migration Service to pull the data from the storage account, to the Cosmos DB database, according to the steps shown here.
At the start of the migration, i get the following fatal error:
Cannot deserialize a 'BsonDocument' from BsonType 'Array'
I don't know how to proceed. Does anyone have experience with such conversions and know how to get past this error?
For when others encounter this same problem in the future: I applied the following to make this work:
Using mongodump, the data gets generated into a file structure which Cosmos DB understands.