Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 13–17 (page: 31)

Updated On: 16-Nov-2026

HOTSPOT (Drag and Drop is not supported)
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account.
You define and implement an encryption policy by using the following C# code:

For each of the following statements, select Yes if the statement is true, otherwise select No.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




Queries can retrieve items from the Customers container by using the taxId field. - Yes
The taxId field is encrypted using deterministic encryption (EncryptionType.Deterministic). Deterministic encryption allows for equality comparisons, meaning that it can be used in queries to retrieve specific items.
If two customers have the same credit card value, the encrypted fields will contain the same value. - No The creditCard field is encrypted using randomized encryption (EncryptionType.Randomized), which produces different ciphertexts for the same plaintext. This means that even if two customers have the same credit card value, the encrypted values will differ.
The Customers container is created if the container does NOT exist. If the container exists, the policy of the container is updated. - No
The code uses .Attach() when defining the container with encryption policies. .Attach() does not create a new container or update an existing container; it merely attaches the policy to the specified container. If the container exists, its policy is not updated, and if it does not exist, this code alone does not create it.



HOTSPOT (Drag and Drop is not supported)
You have an Azure subscription that contains the resources shown in the following table.

You need to query Container1 from the serverless SQL pool of workspace1.
How should you complete the query? To answer, select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




Query Azure Cosmos DB data using a serverless SQL pool
A serverless SQL pool allows you to analyze data in your Azure Cosmos DB containers that are enabled with Azure Synapse Link in near real time without affecting the performance of your transactional workloads. It offers a familiar Transact-SQL (T-SQL) syntax to query data from the analytical store and integrated connectivity to a wide range of business intelligence (BI) and ad-hoc querying tools via the T-SQL interface.
Box 1: OPENROWSET
Serverless SQL pool enables you to query Azure Cosmos DB analytical storage using OPENROWSET function.
OPENROWSET(
'CosmosDB',
'<SQL connection string for Azure Cosmos DB>',
<other parameters>
) [ < with clause > ] AS alias
Box 2: ) WITH
Example
/* Setup - create server-level or database scoped credential with Azure Cosmos DB account key:
CREATE CREDENTIAL MyCosmosDbAccountCredential
WITH IDENTITY = 'SHARED ACCESS SIGNATURE', SECRET = 'yourcosmosdbkey';
*/
SELECT TOP 10 *
FROM OPENROWSET(
PROVIDER = 'CosmosDB',
CONNECTION = 'Account=your-cosmosdb;Database=covid',
OBJECT = 'Ecdc',
SERVER_CREDENTIAL = 'MyCosmosDbAccountCredential'
) with ( date_rep varchar(20), cases bigint, geo_id varchar(6) ) as rows


Reference:

https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/query-cosmos-db-analytical-store



Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have a container named container1 in an Azure Cosmos DB for NoSQL account.
You need to make the contents of container1 available as reference data for an Azure Stream Analytics job.
Solution: You create an Azure Synapse pipeline that uses Azure Cosmos DB for NoSQL as the input and Azure Blob Storage as the output.
Does this meet the goal?

  1. Yes
  2. No

Answer(s): B



You develop an application that uses Azure Cosmos DB Core (SQL) API.
You create an Azure pipeline to build and deploy the application.
You need to change the pipeline to run integration tests that you wrote for the application. The solution must execute entirely in the pipeline.
What should you add to the pipeline?

  1. a deployment group named Cosmos DB testing
  2. an Azure Cosmos DB Emulator task
  3. a NuGet service connection that uses an Azure Cosmos DB API key
  4. a secret variable that has a connection string to an Azure Cosmos DB database

Answer(s): D



HOTSPOT (Drag and Drop is not supported)
You have an Azure Cosmos DB for NoSQL account that hosts the containers shown in the following table.

You need to implement a solution for processing changes to author names. The solution must use a change feed and an Azure Function and must meet the following requirements:
-Ensure that when a name change occurs, the authorName field in the Books container is updated within 30 minutes.
-Minimize costs.
What should you configure? To answer, select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: Authors
Container in which to enable the change feed
To enable the change feed for processing author name changes and updating the Books container, you should use the Authors container.
The change feed acts as a persistent, ordered log of changes (inserts and updates) within a specific container. To achieve your goal, the flow should be as follows:
Monitored Container: The Authors container is the source of truth for author details. Enabling the change feed here allows you to detect exactly when an authorName is modified.
Trigger: Use an Azure Function with a Cosmos DB trigger to listen to the Authors change feed.
Action: When the function detects a name change, it should query the Books container for all items with the matching authorID and update their authorName field.
Cost & Performance: This approach minimizes costs by avoiding the need for constant polling or multiple change feeds on irrelevant containers. By default, the change feed trigger processes events in near real-time, easily meeting your 30-minute requirement.
Box 2: Consumption plan
Azure Functions hosting plan
The Consumption plan is the best Azure Functions hosting plan for this solution.
Why the Consumption Plan is Best
Cost Efficiency: You are billed only for the actual execution time of your functions. Since author name changes are likely infrequent compared to total database operations, you avoid the fixed monthly costs associated with the Premium or Dedicated plans.
Scalability: It automatically scales to handle any volume of change feed events, ensuring updates are processed as they occur.
Latency Requirement: The 30-minute window is generous for this plan. Azure Functions triggered by the Cosmos DB change feed typically react in near real-time (often within seconds), easily meeting your requirement even if a "cold start" occurs.
Free Grant: This plan includes a monthly free grant of 1 million requests and 400,000 GB-s of resource consumption, which may cover the entire cost of low-volume name updates.
Implementation Details
Trigger: Use the Azure Functions trigger for Azure Cosmos DB on the Authors container to detect name changes.
Processing: For each change, the function should query the Books container for all items with the matching authorID and update their authorName field


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/change-feed https://azure-finops-essentials.mindbyte.nl/p/azure-functions-hosting-cost-efficiency



Viewing page 31 of 61
Viewing questions 151 - 155 out of 296 questions


Post your Comments and Discuss Microsoft DP-420 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!