问题
I try to import a bunch of JSON files into cosmos db emulator, so localhost. Ik try to do this using the DocumentDB Data Migration Tool. Before anyone says that the tool is not working for cosmos db. According to Microsoft it should work: https://docs.microsoft.com/en-us/azure/cosmos-db/import-data
But my problem is I can't connect to my local emulator. I tried Googling, but I can't find a right connection string for the tool to work. Any one any idea what the connection string for local emulator is? Or the username and password?
回答1:
Thanks to @Peter B!
Account name: localhost:<port>
Account key: C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==
Found at: https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator
回答2:
The connection string for your app can be
AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==
If you navigate to https://localhost:8081/_explorer/index.html, you can find all the details.
回答3:
The username of Cosmosdb emulator account is localhost.And its password is the Primary Key mentioned in the Quickstart blade in the emulator.
来源:https://stackoverflow.com/questions/47814786/what-is-the-username-and-password-for-the-cosmos-db-emulator