A company wants to run SQL queries on data stored in Azure Cosmos DB for NoSQL. Which API should they use?
The Core (SQL) API is the native and default API for Azure Cosmos DB, optimized for querying JSON documents using a SQL query dialect. It supports familiar relational constructs such as SELECT, WHERE, JOIN, and GROUP BY, adapted to work on schema-flexible NoSQL data. This makes it the only API that directly accepts SQL queries without translation or compatibility layers.
Why this answer
The Core (SQL) API is the native API for Azure Cosmos DB for NoSQL, designed to query JSON documents using a SQL-like syntax. Since the requirement is to run SQL queries on data stored in Azure Cosmos DB for NoSQL, this API directly supports that need without requiring any protocol translation or schema mapping.
Exam trap
The trap here is that candidates often confuse 'SQL queries' with the Cassandra API because both use a SQL-like language, but Cassandra uses CQL, not standard SQL, and is designed for a different data model (wide-column vs. document).
How to eliminate wrong answers
Option B (Gremlin API) is wrong because it is used for graph data models and queries using the Apache TinkerPop graph traversal language, not for SQL queries on NoSQL documents. Option C (Cassandra API) is wrong because it implements the Apache Cassandra wire protocol for wide-column stores and uses CQL (Cassandra Query Language), not standard SQL. Option D (MongoDB API) is wrong because it provides compatibility with MongoDB's document model and query syntax (e.g., BSON, find(), aggregate()), not SQL.