View Full Microsoft DP-420 Exam Dumps and Practice Test Dumps.
Q1. You are building a recommendation application that stores product embeddings directly inside Azure Cosmos DB documents. You need efficient similarity searches against the embedding property. What should you configure?
- A unique key policy on the embedding path.
- A TTL policy on the embedding path.
- A composite index containing the embedding and product ID.
- A vector policy and an appropriate vector index on the embedding path.
Correct Answer: 4. A vector policy and an appropriate vector index on the embedding path.
Explanation: Azure Cosmos DB supports storing high-dimensional vectors alongside regular JSON properties and provides dedicated vector policies and vector indexes for efficient similarity search. The vector configuration defines information such as the vector path, data type, dimensions, and distance function. Queries can then use vector-distance functionality to rank semantically similar items. A unique key enforces uniqueness, TTL controls expiration, and a traditional composite index is not a substitute for a vector index. Vector search is useful for recommendations, semantic retrieval, multimodal search, and other AI-oriented application patterns.
Q2. You are creating a container that will only be accessed by known item IDs and partition keys. The workload performs no SQL queries against document properties. Which indexing configuration can reduce write overhead?
- Set the indexing mode to none.
- Create a composite index for every property.
- Add a full-text index.
- Enable spatial indexing on all paths.
Correct Answer: 1. Set the indexing mode to none.
Explanation: If a container is truly used only for point operations and no property-based queries are required, disabling indexing can reduce the work Cosmos DB performs during writes. Point reads use the item ID and partition key and do not require the general query index. This design should be chosen carefully because SQL queries against unindexed properties will no longer have the expected indexed-query capabilities. Composite, full-text, and spatial indexes would increase index-maintenance work. Microsoft specifically identifies disabled indexing as useful for certain write-heavy point-read workloads.
Q3. You are adding full-text search over a description property in Azure Cosmos DB. You want the search to use an optimized full-text index instead of relying on more expensive unindexed processing. What should you configure?
- Only a unique key policy.
- Only a composite index.
- A full-text policy and a full-text index for the property.
- Only a TTL value on the property.
Correct Answer: 3. A full-text policy and a full-text index for the property.
Explanation: Full-text search in Cosmos DB is optimized by defining both a full-text policy and a corresponding full-text index. The full-text policy identifies which paths contain searchable text and specifies language information, while the indexing policy contains the full-text index for those paths. Full-text queries can run without the optimized index configuration in some scenarios, but they can consume more request units and take longer. Unique keys enforce constraints, composite indexes target other query patterns, and TTL manages item expiration rather than search behavior.
Q4. You need to query geographic data stored as GeoJSON points and efficiently find items that fall within a polygon. Which indexing capability should you configure?
- Full-text indexing.
- Spatial indexing.
- Vector indexing.
- Unique key indexing.
Correct Answer: 2. Spatial indexing.
Explanation: Spatial indexing is designed for geospatial data and supports spatial query functions involving points, polygons, distances, and related geographic relationships. If an application needs to determine whether a point lies within a polygon or calculate geographic proximity, the relevant paths should be configured with appropriate spatial indexing. Full-text indexes support text search, vector indexes support similarity search over embeddings, and unique keys enforce uniqueness constraints. The index type should always match the data type and query workload being optimized.
Q5. A container uses a broad default indexing policy, but a large auditTrail array is never queried. The array is updated frequently and increases write cost. What should you do?
- Make auditTrail the partition key.
- Add a unique key on every array element.
- Add more composite indexes containing auditTrail.
- Exclude the auditTrail path from indexing.
Correct Answer: 4. Exclude the auditTrail path from indexing.
Explanation: Cosmos DB allows specific paths to be excluded from indexing. If a large frequently modified property is never used in filters, ordering, search, or other query operations, excluding that path can reduce index-maintenance overhead during writes. This is especially useful in write-heavy workloads with verbose payloads such as audit history, raw messages, or diagnostic data. Making the property a partition key would not solve index overhead, and adding unique or composite indexes would increase maintenance cost. Index policies should reflect actual access patterns rather than indexing every property indiscriminately.
Q6. A query frequently uses equality filters on region and category and then performs a range comparison on price. What should you evaluate to reduce query RU consumption?
- Disable all indexing.
- Increase TTL.
- Add an appropriate composite index matching the query pattern.
- Change to Strong consistency.
Correct Answer: 3. Add an appropriate composite index matching the query pattern.
Explanation: Composite indexes can improve query patterns involving multiple properties, particularly combinations of equality predicates, range predicates, and ordered results. The property order and sort direction in the index should align with the actual query. Disabling indexes would generally make query behavior worse, while TTL and consistency do not directly optimize this access pattern. Because composite indexes increase write and storage overhead, they should be created only for important recurring queries and validated with request-charge and query-metric measurements after deployment.
Q7. You want to compare the RU cost of two alternative SQL queries that return the same business result. Which value should you capture during testing?
- Request charge from each query response.
- Only the account’s region count.
- Only the partition-key name.
- The backup retention period.
Correct Answer: 1. Request charge from each query response.
Explanation: Every Cosmos DB operation consumes request units, and the SDK exposes the request charge for individual operations. Comparing the RU charge of alternative query implementations is one of the clearest ways to determine which approach is more efficient for a representative workload. Query metrics can provide additional detail about execution behavior, but the request charge provides a direct cost comparison. Region count, partition-key naming, and backup settings do not show how expensive a particular query is. Performance testing should use realistic data volumes and representative partition distributions.
Q8. Your application stores documents with several nested arrays. A query needs to flatten the items array so that each array element can appear as a separate result row. Which SQL construct is appropriate?
- IS_DEFINED.
- JOIN over the array.
- TTL.
- Point-in-time restore.
Correct Answer: 2. JOIN over the array.
Explanation: Cosmos DB for NoSQL supports JOIN semantics for iterating through arrays within a JSON item. A JOIN over an array can produce one query-result row for each matching array element. This differs from relational database joins because Cosmos DB JOINs do not arbitrarily join independent containers or tables. IS_DEFINED checks whether a property exists, while TTL and restore capabilities are unrelated to array traversal. JOINs are particularly useful when documents intentionally embed collections and the application needs to query individual members of those collections.
Q9. You need to create an aggregation container containing daily order totals without recalculating all historical orders whenever a new order is inserted. Which architecture should you use?
- Run a full cross-partition aggregation after every insert.
- Disable the source container index.
- Process the change feed and incrementally update the daily aggregate documents.
- Store the totals only in integrated cache.
Correct Answer: 3. Process the change feed and incrementally update the daily aggregate documents.
Explanation: The change feed is well suited to persistent aggregation patterns. A processor can react to new or modified orders and incrementally update a daily summary document rather than rescanning the entire order history. This reduces repeated query cost and separates operational writes from reporting calculations. The processing logic should be idempotent because retries can occur. Integrated cache is not durable storage, and disabling indexing does not maintain summaries. Aggregation persistence through change feed is explicitly part of the current DP-420 skill outline.
Q10. A parent document references a separate child entity by ID. You need to flag parent documents when the referenced child is removed. Cosmos DB does not enforce relational foreign keys. What should you implement?
- Change feed processing that detects relevant changes and applies referential-enforcement logic.
- A vector index.
- A full-text policy.
- A continuation token.
Correct Answer: 1. Change feed processing that detects relevant changes and applies referential-enforcement logic.
Explanation: Azure Cosmos DB is a non-relational database and does not automatically enforce foreign-key relationships between independent documents. If an application chooses a reference-based design, referential integrity can be enforced by application logic. Change feed processing can react to deletions or other changes and update dependent documents, create warnings, or trigger compensating actions. Vector and full-text indexes solve search workloads, while continuation tokens support pagination. Referential enforcement using change feed is specifically listed among current DP-420 data-modeling objectives.
Q11. You need to archive finalized transaction records to another storage service without making the original transaction request wait for the archive operation. Which pattern should you use?
- Perform the archive inside every point read.
- Set the partition key to the archive destination.
- Disable TTL.
- Process finalized records asynchronously through the change feed.
Correct Answer: 4. Process finalized records asynchronously through the change feed.
Explanation: Change feed processing provides an asynchronous way to detect finalized records and copy them to an archive destination without increasing the latency of the original write request. This approach separates operational transactions from downstream archival processing. The archive consumer should be designed for retries and idempotency so the same change does not create incorrect duplicates. Point reads should not trigger archive behavior, and partition keys or TTL settings do not provide an archival integration workflow. Data archiving through change feed is part of the DP-420 data-modeling objectives.
Q12. A change feed processor runs on multiple application instances. You add two more instances to handle increased change volume. What should happen automatically?
- Every instance should process every feed range independently.
- Lease ownership should rebalance across the available processor instances.
- The source container should be recreated.
- The partition key should change.
Correct Answer: 2. Lease ownership should rebalance across the available processor instances.
Explanation: The change feed processor uses a lease container to coordinate ownership of feed ranges across worker instances. As instances are added or removed, lease ownership can rebalance so the available work is distributed across the active processors. This provides a convenient scale-out model without requiring the application to manually assign every feed range. Having each instance process the entire feed would duplicate work. The source container and partition key do not need to change simply because consumer capacity is scaled.
Q13. You want an application identity to query one specific Cosmos DB database without receiving account-wide data privileges. Which security principle should you apply?
- Assign a narrowly scoped Microsoft Entra data-plane role.
- Give the identity the account’s primary key.
- Assign subscription Owner.
- Disable authorization for that database.
Correct Answer: 1. Assign a narrowly scoped Microsoft Entra data-plane role.
Explanation: Microsoft Entra-based data-plane authorization supports least-privilege access to Cosmos DB data. Rather than distributing broad account keys, an application identity can receive only the permissions and resource scope required for its workload. This improves security, simplifies credential management, and supports clearer auditing. Subscription Owner is a control-plane management role with far broader privileges than required, and disabling authorization would be insecure. Security design should distinguish management-plane permissions from data-plane permissions and scope both as narrowly as practical.
Q14. Your Cosmos DB account must be reachable only through an approved virtual network and must not expose the public endpoint. Which configuration should you use?
- Session consistency.
- TTL.
- Integrated cache.
- Private endpoint and restricted public network access.
Correct Answer: 4. Private endpoint and restricted public network access.
Explanation: Azure Private Link enables a private endpoint for a Cosmos DB account inside a virtual network. Organizations can restrict or disable public network access so approved workloads connect through private networking. DNS must be configured correctly so the account hostname resolves to the private IP address for authorized clients. Session consistency, TTL, and integrated cache do not provide network isolation. Private networking should still be paired with identity-based authorization because network reachability and data permissions solve different security problems.
Q15. Your application must tolerate a regional outage while continuing to accept writes from another Azure region. Which account configuration should you consider?
- One read region only.
- Multi-region writes.
- TTL.
- Indexing mode none.
Correct Answer: 2. Multi-region writes.
Explanation: Multi-region writes allow more than one Azure region to accept writes, improving write availability and potentially reducing write latency for geographically distributed applications. If one writable region is unavailable, other configured write regions can continue processing writes. This architecture introduces the possibility of concurrent updates, so conflict-resolution behavior must be planned carefully. TTL and indexing do not provide regional write availability. The design should also consider consistency level, application region preference, cost, and data residency requirements.
Q16. A globally distributed application requires that reads never be more than 10 minutes behind committed writes. Which consistency model should you evaluate?
- Eventual.
- Consistent prefix.
- Bounded staleness.
- Session only.
Correct Answer: 3. Bounded staleness.
Explanation: Bounded staleness lets an application define a maximum permitted lag between reads and writes using a version or time-based bound. It provides a stronger guarantee than eventual or consistent-prefix consistency while allowing more flexibility than strong consistency. Session consistency provides read-your-writes behavior for a session but does not define the same global staleness bound. A workload requiring a specific maximum delay, such as ten minutes, should evaluate bounded staleness while also considering latency, availability, and throughput implications.
Q17. You are diagnosing a production slowdown. Azure Monitor shows low server-side latency, but SDK diagnostics show long request durations. What should you investigate next?
- Client networking, connection management, retries, and application-side delays.
- Only the TTL policy.
- Only the backup interval.
- Only unique keys.
Correct Answer: 1. Client networking, connection management, retries, and application-side delays.
Explanation: If Cosmos DB server-side processing is fast but end-to-end requests are slow, the delay is likely occurring outside the database engine. Possible causes include network distance, DNS resolution, client connection setup, thread starvation, retries, resource exhaustion, or application processing. SDK diagnostics can help break down these timings. TTL, backup configuration, and unique-key policies do not normally explain the gap between low service latency and high application-observed latency. Comparing service metrics with client diagnostics is a key troubleshooting technique.
Q18. You need to detect when one physical partition is receiving substantially more RU demand than the others. Which monitoring approach is most useful?
- Review only the account’s total storage.
- Monitor throughput consumption across partitions.
- Review only continuous-backup status.
- Monitor only the number of stored procedures.
Correct Answer: 2. Monitor throughput consumption across partitions.
Explanation: Partition-level throughput monitoring helps identify hot partitions where request-unit demand is concentrated. An account can appear healthy at the aggregate level while one physical partition experiences throttling because its portion of the workload is disproportionately high. This can indicate a skewed partition-key access pattern or a small number of very active tenants. Total storage and backup status do not reveal RU distribution. DP-420 specifically includes monitoring throughput and data distribution across partitions as maintenance objectives.
Q19. Your organization uses continuous backup. Before restoring after an accidental update, what must you identify first?
- A valid restore point before the unwanted change occurred.
- A continuation token.
- The current session token.
- A vector-index definition.
Correct Answer: 1. A valid restore point before the unwanted change occurred.
Explanation: Point-in-time restore requires selecting a valid time within the supported continuous-backup retention window. The chosen point should be early enough to exclude the unwanted update while preserving as much valid later data as possible. Administrators should determine when the damaging change began and select the appropriate restore timestamp and resource scope. Continuation tokens, session tokens, and indexes do not determine recovery state. Locating a restore point is explicitly included in the current DP-420 backup and restore objectives.
Q20. You need a centralized place to investigate Cosmos DB resource logs with Kusto queries and correlate them with application logs. What should you configure?
- Integrated cache.
- TTL.
- Azure Monitor diagnostic settings that send logs to a Log Analytics workspace.
- A unique key policy.
Correct Answer: 3. Azure Monitor diagnostic settings that send logs to a Log Analytics workspace.
Explanation: Cosmos DB resource logs can be routed through Azure Monitor diagnostic settings to a Log Analytics workspace. There they can be queried with Kusto Query Language and correlated with telemetry from applications, networking components, and other Azure resources. This supports troubleshooting, auditing, security investigations, and operational monitoring. Integrated cache improves reads, TTL controls document lifecycle, and unique keys enforce constraints. The current DP-420 objectives specifically include implementing and querying Azure Monitor resource logs as part of solution maintenance.