DEV Community

Cover image for Uploading your JSON data to Azure Cosmos DB for MongoDB API

Uploading your JSON data to Azure Cosmos DB for MongoDB API

Jay Gordon on April 15, 2019

We've selected our favorite tips and tricks created by Michael Crump and are delivering fresh technical content on Azure all April! Miss a day (or ...
Collapse
 
turnerj profile image
James Turner

I was actually pretty keen to try CosmosDB for a major project of mine though it turns out that it isn't fully MongoDB compatible. While this particular command might not be called very often, it turns out you can't rename collections which unfortunately is part of the migration process for Hangfire, a piece of software I can't live without. There is a UserVoice item for it but it isn't considered in part of its roadmap.

Besides not being able to use Hangfire MongoDB with CosmosDB, I am somewhat concerned this isn't the only thing that is missing. Given I am using libraries on my end to abstract the raw Wire Protocol calls, I wouldn't even know if a specific command will or won't work till I run it. Not really a good place to be if I want to run a production environment on it with MongoDB.

Collapse
 
jaydestro profile image
Jay Gordon

I think it's reasonable to say that you can consider using the MongoDB product like Atlas on Azure if Cosmos DB doesn't fit your needs.

Best of luck!

Collapse
 
turnerj profile image
James Turner

Oh yeah, most definitely. Atlas on Azure is what I decided to go with instead.

Collapse
 
tpanagos profile image
Tim Panagos

Can you comment on how to deal with RU limit errors? I am just trying to import 250 records using mongoimport and there is no setting for scale that will allow me to do this. What am I missing?

{Message: {"Errors":["Request rate is large. More Request Units may be needed, so no changes were made. Please retry this request later. Learn more: aka.ms/cosmosdb-error-429"]}

Collapse
 
jaydestro profile image
Jay Gordon • Edited

Feel free to ask questions or reach out.