In the older CosmosDB 3.2 I was able to use mongoimport to take data previously backed up by mongoexport and import it into CosmosDB collections. All was well and good.
With the newer CosmosDB 3.6, the same command gets the error:
Retryable writes are not supported. Please disable retryable writes by specifying "retrywrites=false" in the connection string or an equivalent driver specific config
So I do this, I tried &retryWrites=false, &RetryWrites=false, &retrywrites=false in the connection string, but I still get the same error. The same with mongorestore.
I am using the latest mongo-tools v100.2.1.
Anyone got any ideas?
I've tried the solution from this answer and it worked indeed.
We can attach this command --writeConcern="{w:0}"
, here's my result.
mongoimport.exe --uri "<cosmosdb_connect_string>" --db Database1 --collection collection1 --type json --file edx.json --ssl --sslAllowInvalidCertificates --writeConcern {w:0}