Database guides

Azure Cosmos DB

Updated 2026-08-01 · 3 min read

Query the Core (SQL) API directly with your account key. AddisDB signs every request for you — no SDK, no emulator.

AddisDB connects to Azure Cosmos DB’s Core (SQL) API over REST, signing each request with your account key using Cosmos’s own HMAC scheme. Databases and containers show up in the sidebar, and you query with Cosmos SQL.

Who it is for

Cosmos DB is Azure’s globally distributed, multi-model database. It replicates to any set of regions with a checkbox, offers tunable consistency levels rather than a single take-it-or-leave-it guarantee, and bills by provisioned or serverless throughput.

Everything about it is priced in Request Units. A read of a small document costs about one RU; a cross-partition query costs many. That single number is why partition-key design matters more here than almost anywhere else — a query that can name its partition key is cheap, and one that cannot fans out across every physical partition.

Reach for it when you are already on Azure and need low-latency reads in several regions, or when your throughput is spiky enough that serverless billing beats sizing a cluster.

Set up the account

  1. In the Azure portal, create an Azure Cosmos DB account and choose the Core (SQL) API — the other APIs speak different protocols.
  2. Create a database and a container inside it, and choose a partition key with high cardinality.
  3. Open Settings → Keys and copy the URI and the Primary Key (or a read-only key, which is the better choice here).
  4. Under Networking, make sure your client IP is allowed if you have restricted access.

Connect from AddisDB

  1. New Connection → Azure Cosmos DB under Document. Port prefills to 443.
  2. Put your account endpoint in Host — something like myaccount.documents.azure.com.
  3. Paste the account key into the API key / token field. It is stored in your device’s secure store, never on our servers.
  4. Set Database to the Cosmos database, or database/container to open one container directly.
  5. Alternatively paste the full AccountEndpoint=…;AccountKey=…; connection string into the Connection URL box.
  6. Test, then Save.

Only the Core (SQL) API is supported. An account created for the MongoDB, Cassandra, Gremlin or Table API speaks a different protocol — for a Cosmos account with the MongoDB API, use AddisDB’s MongoDB engine instead.

How to query it

SELECT c.id, c.customerName, c.total
FROM c
WHERE c.total > 100

Cosmos SQL always queries a single container, aliased as c by convention. Opening a container from the sidebar sets that context for you.

There are no joins between containers — JOIN in Cosmos SQL unrolls an array inside the same document. Filter on the partition key whenever you can; that is the difference between reading one partition and reading all of them.

-- JOIN here unrolls a nested array, not another container
SELECT c.id, t
FROM c JOIN t IN c.tags
WHERE c.customerId = "c-1024"

What AddisDB gives you

  • Databases and containers listed in the sidebar.
  • Documents flattened into the grid, with the JSON tab for the original.
  • Read-only enforcement — anything that is not a SELECT is rejected before it reaches Azure.
  • The Chart view for aggregations, and AI chat grounded in your containers.
  • Query tabs and history, and ⌘K search across every connection.