I'm writing a script to do some bulk imports (From a CSV) to documentDB using NodeJS and Docooment.
Is there a way to do Bulk Inserts?
I'm aware it's based on Mongoose but the examples around bulk inserts for Mongoose relate to specific MongoDB features.
I'd recommend going with one of the following options:
DocumentDB's Data Migration Tool
The easiest way to bulk import data from a CSV in to DocumentDB is to use DocumentDB's migration tool. You can find details on how to use it here.
Programatically via Stored Procedures (Database-Side Scripting)
If you'd like bulk import data programatically, I'd recommend checking out DocumentDB's stored procedures - which allow you to perform batching and sequencing operations on the database server itself (avoiding the need to make multiple network requests).
Here's a sample stored procedure for bulk importing data:
You can find reference documentation regarding DocumentDB database-side programming (stored procedures, triggers, and UDFs) here.