View Full Microsoft DP-420 Exam Dumps and Practice Test Dumps.
Q1. You need a change feed consumer to capture creates, updates, and deletes, including intermediate versions of an item. Which change feed mode should you use?
- Latest version mode
- All versions and deletes mode
- Integrated cache mode
- Analytical store mode
Correct Answer: 2. All versions and deletes mode
Explanation: All versions and deletes mode provides a record of creates, updates, and deletes, including intermediate versions that can occur between change feed reads. This makes it useful for auditing, synchronization, and scenarios where deletion events must be detected. It requires continuous backup to be enabled and is available for supported Azure Cosmos DB for NoSQL accounts. Latest version mode focuses on the most recent version of changed items and does not provide the same delete-history behavior. Integrated cache and analytical store are unrelated to change feed version tracking.
Q2. An application uses the default latest-version change feed mode. An item is created and updated several times before the consumer processes the feed. What should the consumer expect?
- Every historical version plus the deletion record
- No record because the item changed more than once
- Only the original created version
- The latest version of the changed item
Correct Answer: 4. The latest version of the changed item
Explanation: Latest-version change feed mode provides the latest available version of an item when the consumer reads the feed. If an item is created and updated multiple times before it is processed, the consumer may see only the latest version rather than each intermediate modification. This behavior is appropriate for projections and event-driven applications that care about current state rather than complete change history. If every intermediate version and deletion must be captured, all versions and deletes mode is more appropriate. Understanding the chosen change feed semantics is important when designing downstream processing.
Q3. You need to process deletion events through the all versions and deletes change feed mode. What prerequisite must the Azure Cosmos DB account satisfy?
- Continuous backup must be enabled.
- The account must use Strong consistency.
- Every container must use serverless throughput.
- Integrated cache must be enabled.
Correct Answer: 1. Continuous backup must be enabled.
Explanation: All versions and deletes change feed mode depends on continuous backup because the service uses the retained version history to expose creates, intermediate updates, and deletes. Without continuous backup, this richer change history is not available. Strong consistency controls read guarantees and is unrelated to the feature requirement. Serverless throughput and integrated cache also do not enable deletion tracking. When designing audit or synchronization workloads that require deletion events, backup mode becomes part of the overall application architecture rather than only a disaster-recovery consideration.
Q4. You are using a Patch operation to change an item’s status only when its current status is “pending”. Which capability should you use?
- A continuation token
- TTL
- A conditional Patch filter predicate
- Analytical store
Correct Answer: 3. A conditional Patch filter predicate
Explanation: Conditional Patch allows an application to apply partial updates only when specified conditions are satisfied. For example, the operation can change a status to “complete” only if the current document still has “pending” status. This reduces the need to read and replace an entire item simply to enforce a straightforward update condition. Continuation tokens are for query pagination, TTL controls expiration, and analytical store supports analytical workloads. Conditional updates are useful for maintaining application invariants and reducing unnecessary network traffic when only a few properties require modification.
Q5. You need to retrieve several known items efficiently. You already have the id and partition key for every required item. Which SDK capability is preferable to a general SQL query?
- Change feed pull model
- ReadMany or equivalent multi-item point-read functionality
- A full container scan
- A UDF
Correct Answer: 2. ReadMany or equivalent multi-item point-read functionality
Explanation: When item IDs and partition keys are already known, point-oriented operations avoid unnecessary query processing. A multi-item read capability such as ReadMany can retrieve several known items more efficiently than issuing a general SQL query that searches the container. This is particularly useful when application logic already has the exact identities of required records. The change feed is intended for detecting changes, while a UDF extends query expressions. Designing applications so frequently accessed items can be addressed directly by ID and partition key can significantly improve efficiency.
Q6. Your application needs to reject an update if another client modified the item after it was read. Which mechanism should you use?
- ETag-based optimistic concurrency control
- TTL
- A continuation token
- Integrated cache
Correct Answer: 1. ETag-based optimistic concurrency control
Explanation: Cosmos DB assigns an ETag to each item, and the ETag changes whenever the item is modified. An application can include the previously read ETag in a conditional update request. If another client modified the document in the meantime, the ETag no longer matches and the write can be rejected. This is optimistic concurrency because no long-running lock is held. TTL controls item lifetime, continuation tokens represent query progress, and integrated cache improves eligible read performance. ETag conditions are useful whenever multiple application instances may update the same logical record.
Q7. You have a frequently accessed reference-data container. Reads can tolerate a small amount of staleness, and you want to reduce backend RU consumption. Which capability is most appropriate?
- Multi-region writes
- Strong consistency
- Stored procedures
- Integrated cache
Correct Answer: 4. Integrated cache
Explanation: Integrated cache can serve eligible point reads and queries from a cache associated with the dedicated gateway. This can reduce request-unit consumption against the transactional backend and improve latency for repeatedly requested data. It is most appropriate when the application can tolerate the configured staleness window. Strong consistency works against a staleness-tolerant strategy, while stored procedures and multi-region writes solve different requirements. Reference and lookup data that changes relatively infrequently can be a strong candidate for caching when freshness expectations are clearly defined.
Q8. Your application stores vectors for semantic search. Which configuration identifies the vector path, dimensions, data type, and distance function?
- Unique key policy
- TTL policy
- Vector embedding policy
- Failover policy
Correct Answer: 3. Vector embedding policy
Explanation: A vector embedding policy defines the characteristics of vectors stored in Cosmos DB, including the document path, vector dimensions, data type, and distance function. This information enables the service to understand how vector values should be interpreted during similarity-search operations. A vector index can then be configured to improve search performance. Unique keys, TTL, and failover configuration address integrity, lifecycle, and availability rather than AI-oriented similarity search. Correct vector configuration is essential because embeddings with incompatible dimensions or distance metrics cannot be meaningfully compared.
Q9. You need native search that considers semantic similarity from embeddings and keyword relevance from document text. What should you design?
- TTL-only search
- Unique-key search
- Point-read search
- A hybrid search approach using vector and full-text capabilities
Correct Answer: 4. A hybrid search approach using vector and full-text capabilities
Explanation: Hybrid search combines semantic similarity from vector embeddings with lexical or keyword relevance from full-text search. This can improve retrieval quality when neither semantic similarity nor exact textual matching is sufficient by itself. A vector policy and index support embedding-based similarity, while full-text policies and indexes support optimized textual search. TTL controls retention, unique keys enforce constraints, and point reads retrieve exact known items rather than ranked search results. Hybrid retrieval is especially useful in modern RAG, knowledge-base, product discovery, and recommendation workloads.
Q10. You need to determine whether a query is inefficient because it retrieves many index matches but outputs few documents. Which information should you inspect?
- Query metrics and index-utilization information
- Only the account name
- Only the backup retention period
- The current failover priority only
Correct Answer: 1. Query metrics and index-utilization information
Explanation: Query metrics can show how much work Cosmos DB performs compared with the number of results returned. Index-utilization information can help identify whether relevant predicates are being efficiently supported by the current indexing policy. If a query retrieves or examines many candidates but returns very few documents, its predicates, partition routing, or indexes may need adjustment. Account metadata and backup configuration provide no insight into query execution efficiency. Query optimization should combine request-charge measurements, metrics, partition-key awareness, and carefully chosen index policies.
Q11. A frequently executed query is unexpectedly expensive. You want the most direct numerical measure of how many request units it consumes. What should you capture?
- Number of Azure regions
- Request charge from the query response
- Number of stored procedures
- Container TTL
Correct Answer: 2. Request charge from the query response
Explanation: Cosmos DB returns the request-unit charge associated with each operation. Capturing the request charge allows developers to compare alternative query implementations, estimate capacity requirements, and identify access patterns that are consuming disproportionate resources. A query returning only a few records can still be expensive if it performs cross-partition work or cannot use an appropriate index. Region count and TTL are unrelated to a particular query’s RU consumption. Representative RU measurements are a practical basis for performance and cost optimization.
Q12. You need a Cosmos DB query to perform a case-insensitive full-text search over a designated text property using the native full-text capability. What must exist first?
- A unique key policy
- A change feed lease
- A full-text policy and full-text index for the searchable path
- Strong consistency
Correct Answer: 3. A full-text policy and full-text index for the searchable path
Explanation: Native full-text search requires the relevant text paths to be identified in a full-text policy and indexed using the corresponding full-text index configuration. This allows Cosmos DB to process text according to its search semantics rather than treating it only as a scalar value. Unique keys enforce uniqueness, change feed leases track processor progress, and consistency levels control replica read behavior. Full-text configuration should be planned around language, searchable paths, expected query patterns, and index-maintenance costs.
Q13. You need to maintain a denormalized customer summary document every time an order changes. You want the order write to complete independently of the summary update. What should you implement?
- Change feed processing that updates the summary asynchronously
- A synchronous cross-partition transaction
- A query after every point read
- Integrated cache as the summary store
Correct Answer: 1. Change feed processing that updates the summary asynchronously
Explanation: The change feed allows downstream processors to react to order changes after the original transaction commits. A processor can update denormalized customer summaries without extending the latency of the order write. This produces an eventually consistent projection, so the application should tolerate some delay and monitor processor lag. Cross-partition atomic transactions are not available in the way described, while cache is not a durable system of record. Change feed-driven denormalization is a common Cosmos DB design pattern because it optimizes data for different access paths.
Q14. You need an Azure Function to execute automatically when items change in a Cosmos DB container. Which configuration should you use?
- TTL
- Integrated cache
- Manual failover
- Azure Functions Cosmos DB trigger
Correct Answer: 4. Azure Functions Cosmos DB trigger
Explanation: The Azure Functions Cosmos DB trigger uses the change feed to invoke serverless code when new or updated items are available. This simplifies event-driven architectures because the trigger handles much of the coordination required to consume the change feed. Common scenarios include notifications, denormalization, aggregation, integration, and archival. TTL controls expiration, integrated cache optimizes reads, and failover manages regional roles. Trigger-based workloads should still be designed for idempotency because retries can result in the same logical change being processed again.
Q15. Your organization needs to stream Cosmos DB changes to a high-throughput messaging system for consumption by multiple independent applications. Which Azure service is suitable?
- Azure Bastion
- Azure Event Hubs
- Azure DNS
- Azure Policy
Correct Answer: 2. Azure Event Hubs
Explanation: Azure Event Hubs is a high-throughput event-streaming platform that can distribute events to multiple independent consumers. A Cosmos DB change feed consumer or Azure Function can publish item changes into Event Hubs, enabling downstream systems to process those events independently. Bastion provides virtual-machine connectivity, DNS resolves network names, and Azure Policy supports governance. Combining change feed with Event Hubs is useful when Cosmos DB operational changes need to become part of a broader enterprise event-streaming architecture.
Q16. A Spark workload needs to perform large analytical scans without consuming transactional RU/s. Which Cosmos DB data representation should it use when available?
- Transactional store through repeated point reads
- Lease container
- Analytical store
- Backup metadata
Correct Answer: 3. Analytical store
Explanation: Analytical store provides a column-oriented representation intended for large analytical workloads. It helps separate analytics from the transactional request-unit workload, reducing interference with production applications. Spark and other supported analytical tools can use this representation for broad scans and transformations. The transactional store remains appropriate when the workload requires operational point access or writes. Lease containers are for change feed coordination, while backup metadata is not an analytical data source. Selecting the appropriate store is important for both performance and workload isolation.
Q17. A security requirement states that application traffic to Cosmos DB must remain on a private virtual network path. Which feature should you configure?
- A private endpoint using Azure Private Link
- A SQL UDF
- TTL
- A continuation token
Correct Answer: 1. A private endpoint using Azure Private Link
Explanation: A private endpoint assigns private network connectivity to the Cosmos DB account through Azure Private Link. This allows applications in approved virtual networks to access the account without relying on public internet routing. Public network access can also be restricted according to security requirements. Correct DNS configuration is critical so clients resolve the Cosmos DB endpoint to the intended private IP. UDFs, TTL, and continuation tokens solve unrelated query, lifecycle, and pagination requirements. Private networking should be combined with appropriate authentication and least-privilege authorization.
Q18. An Azure-hosted application must authenticate to Cosmos DB without storing passwords or account keys. Which approach should you prefer?
- Embed the primary account key in application code.
- Microsoft Entra authentication using a managed identity
- Store the account key in every document.
- Disable authentication on the account.
Correct Answer: 2. Microsoft Entra authentication using a managed identity
Explanation: Managed identities provide Azure-hosted applications with an identity that can authenticate to supported services without developers managing credentials. Appropriate Cosmos DB data-plane roles can then authorize only the operations required by the application. This approach avoids distributing long-lived account keys and simplifies credential lifecycle management. Hard-coded or document-stored keys create significant security risks, while disabling authentication is unacceptable. Managed identities should be combined with least-privilege role assignments and appropriate network controls.
Q19. An account uses continuous backup. You need to determine the correct time to restore from after an application introduced incorrect updates. What should you locate?
- An appropriate point-in-time restore point before the incorrect updates
- A continuation token
- The current ETag for every document
- A change feed lease
Correct Answer: 1. An appropriate point-in-time restore point before the incorrect updates
Explanation: Point-in-time recovery depends on selecting a restore timestamp that predates the damaging operation. Administrators should determine when the incorrect update began and choose a supported restore point that removes the corruption while minimizing the loss of valid subsequent changes. Continuation tokens, ETags, and change feed leases do not define database recovery state. Backup and recovery procedures should be documented and tested so operators can quickly identify affected resources, restore them, validate the result, and safely redirect application traffic.
Q20. You need an automated alert when one physical partition remains close to its RU limit for several minutes. What should you configure?
- A stored procedure
- TTL
- Azure Monitor alerting based on partition-level throughput metrics
- A unique key policy
Correct Answer: 3. Azure Monitor alerting based on partition-level throughput metrics
Explanation: Partition-level throughput monitoring can identify hot partitions that may be approaching their available RU capacity even when account-level utilization appears acceptable. Azure Monitor alert rules can evaluate relevant metrics over time and notify operators through an action group when thresholds are sustained. This enables teams to respond before throttling significantly affects applications. Stored procedures, TTL, and unique keys do not provide operational capacity alerts. Monitoring both RU distribution and data distribution is essential for validating the effectiveness of the partition-key design in production.