DEV Community

Cover image for Using VS Code to work with Cosmos DB
Burke Holland for Microsoft Azure

Posted on

3 1

Using VS Code to work with Cosmos DB

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 more)? Catch up with the series.

Don't have Azure? Grab a free subscription.

What is Cosmos DB? Azure Cosmos DB is Microsoft's globally distributed, multi-model database.

You can easily view, create and delete databases, collections, graphs, and documents, along with other things detailed in their marketplace submission.

Download the Cosmos DB Extension for VS Code

After installing it via the extension above, here is what it looks like to set up our Cosmos DB resource and type from within Visual Studio Code.

Now we'll set up our database and collection.

Finally, we'll create a document and add the following data to it.

{
    "name": "learn cosmos db",
}
Enter fullscreen mode Exit fullscreen mode

Want more VS Code? Check out our quickstarts and tutorials!


We'll be posting articles every day in April, so stay tuned or jump ahead and check out more tips and tricks now.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (1)

Collapse
 
stephen__steve profile image
stephen steve β€’

Is there a way to run queries from vscode ?

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

πŸ‘₯ Ideal for solo developers, teams, and cross-company projects

Learn more