title | description | keywords | services | author | manager | editor | documentationcenter | ms.assetid | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Use MongoChef with an Azure DocumentDB account with protocol support for MongoDB | Microsoft Docs |
Learn how to use MongoChef with a DocumentDB account with protocol support for MongoDB, now available for preview. |
mongochef |
documentdb |
AndrewHoh |
jhubbard |
352c5fb9-8772-4c5f-87ac-74885e63ecac |
documentdb |
data-services |
na |
na |
article |
11/29/2016 |
anhoh |
To connect to an Azure DocumentDB account with protocol support for MongoDB using MongoChef, you must:
- Download and install MongoChef
- Have your DocumentDB account with protocol support for MongoDB connection string information
To add your DocumentDB account with protocol support for MongoDB to the MongoChef connection manager, perform the following steps.
-
Retrieve your DocumentDB with protocol support for MongoDB connection information using the instructions here.
-
Click Connect to open the Connection Manager, then click New Connection
-
In the New Connection window, on the Server tab, enter the HOST (FQDN) of the DocumentDB account with protocol support for MongoDB and the PORT.
-
In the New Connection window, on the Authentication tab, choose Authentication Mode Standard (MONGODB-CR or SCARM-SHA-1) and enter the USERNAME and PASSWORD. Accept the default authentication db (admin) or provide your own value.
-
In the New Connection window, on the SSL tab, check the Use SSL protocol to connect check box and the Accept server self-signed SSL certificates radio button.
-
Click the Test Connection button to validate the connection information, click OK to return to the New Connection window, and then click Save.
To create a database, collection, and documents using MongoChef, perform the following steps.
-
In Connection Manager, highlight the connection and click Connect.
-
Right click the host and choose Add Database. Provide a database name and click OK.
-
Right click the database and choose Add Collection. Provide a collection name and click Create.
-
Click the Collection menu item, then click Add Document.
-
In the Add Document dialog, paste the following and then click Add Document.
{ "_id": "AndersenFamily", "lastName": "Andersen", "parents": [ { "firstName": "Thomas" }, { "firstName": "Mary Kay"} ], "children": [ { "firstName": "Henriette Thaulow", "gender": "female", "grade": 5, "pets": [{ "givenName": "Fluffy" }] } ], "address": { "state": "WA", "county": "King", "city": "seattle" }, "isRegistered": true }
-
Add another document, this time with the following content.
{ "_id": "WakefieldFamily", "parents": [ { "familyName": "Wakefield", "givenName": "Robin" }, { "familyName": "Miller", "givenName": "Ben" } ], "children": [ { "familyName": "Merriam", "givenName": "Jesse", "gender": "female", "grade": 1, "pets": [ { "givenName": "Goofy" }, { "givenName": "Shadow" } ] }, { "familyName": "Miller", "givenName": "Lisa", "gender": "female", "grade": 8 } ], "address": { "state": "NY", "county": "Manhattan", "city": "NY" }, "isRegistered": false }
-
Execute a sample query. For example, search for families with the last name 'Andersen' and return the parents and state fields.
- Explore DocumentDB with protocol support for MongoDB samples.