DP-420 Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions and Answers
You need to identify which connectivity mode to use when implementing App2. The solution must support the planned changes and meet the business requirements.
Which connectivity mode should you identify?
You configure multi-region writes for account1.
You need to ensure that App1 supports the new configuration for account1. The solution must meet the business requirements and the product catalog requirements.
What should you do?
You need to implement a solution to meet the product catalog requirements.
What should you do to implement the conflict resolution policy.
You need to provide a solution for the Azure Functions notifications following updates to con-product. The solution must meet the business requirements and the product catalog requirements.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
You need to recommend indexes for con-product and con-productVendor. The solution must meet the product catalog requirements and the business requirements.
Which type of index should you recommend for each container? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

The settings for a container in an Azure Cosmos DB Core (SQL) API account are configured as shown in the following exhibit.

Which statement describes the configuration of the container?
You have the following Azure Resource Manager (ARM) template.

You plan to deploy the template in incremental mode.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.

You have an Azure Cosmos DB account named account1 that uses the Core (SQL) API, You have a web service that receives JSON-based messages.
You need to recommend a solution that will process and store the messages m a container in account1. The solution must minimize latency.
What should you include in the recommendation?
You have a database in an Azure Cosmos DB Core (SQL) API account.
You plan to create a container that will store employee data for 5,000 small businesses. Each business will have up to 25 employees. Each employee item will have an emailAddress value.
You need to ensure that the emailAddress value for each employee within the same company is unique.
To what should you set the partition key and the unique key? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

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 container! 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 function that uses the Azure Cosmos 08 for NoSQL change feed as a trigger and an Azure event hub as the output.
Does this meet the goal?
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 Core (SQL) API 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 Core (SQL) API as the input and Azure Blob Storage as the output.
Does this meet the goal?
You have an Azure subscription.
You plan to implement an Azure Cosmos DB for NoSQL single-region write account named account1 that will replicate across two Azure regions.
You need to set the default consistency level for account1. The solution must meet the following requirements:
• Writes must be performed to a local majority in a single region.
• Reads must be performed from a local minority in a single region.
Which consistency level should you select?
You have a container named contained in an Azure Cosmos DB for NoSQL account.
The following is a sample of a document in container1.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

You have an Azure Cosmos DB for NoSQL account that uses a custom conflict resolution policy. The account has a registered merge procedure that throws a runtime exception. The runtime exception prevents conflicts from being resolved.
You need to use an Azure function to resolve the conflicts. What should you use?
You need to create a data store for a directory of small and medium-sized businesses (SMBs). The data store must meet the following requirements:
* Store companies and the users employed by them. Each company will have less than 1,000 users.
* Some users have data that is greater than 2 KB.
* Associate each user to only one company.
* Provide the ability to browse by company.
* Provide the ability to browse the users by company.
* Whenever a company or user profile is selected, show a details page for the company and all the related users.
* Be optimized for reading data.
Which design should you implement to optimize the data store for reading data?
You maintain a relational database for a book publisher. The database contains the following tables.

The most common query lists the books for a given authorId.
You need to develop a non-relational data model for Azure Cosmos DB Core (SQL) API that will replace the relational database. The solution must minimize latency and read operation costs.
What should you include in the solution?
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account named account1 and a Log Analytics workspace named Workspace1. Workspace 1 stores the logs of account1.
You need to identify which operations used the most request units per second (RU/s) during the last 24 hours.
How should you complete the query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point

You have an Azure Cosmos DB Core (SQL) API account named account1.
In account1, you run the following query in a container that contains 100GB of data.
SELECT *
FROM c
WHERE LOWER(c.categoryid) = " hockey "
You view the following metrics while performing the query.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

You have an application named App1 that reads the data in an Azure Cosmos DB Core (SQL) API account. App1 runs the same read queries every minute. The default consistency level for the account is set to eventual.
You discover that every query consumes request units (RUs) instead of using the cache.
You verify the IntegratedCacheiteItemHitRate metric and the IntegratedCacheQueryHitRate metric. Both metrics have values of 0.
You verify that the dedicated gateway cluster is provisioned and used in the connection string.
You need to ensure that App1 uses the Azure Cosmos DB integrated cache.
What should you configure?
You plan to use a multi-region Azure Cosmos DB for NoSQL account to store data for a new application suite. The suite contains the applications shown in the following table.

Each application should use the weakest consistency level possible.
Which consistency level should you configure for each application? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

You have a container named container1 in an Azure Cosmos DB Core (SQL) API account.
You need to provide a user named User1 with the ability to insert items into container1 by using role-based access control (RBAC). The solution must use the principle of least privilege.
Which roles should you assign to User1?
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account
You need to write a SQL query that will return multiple items. The solution must meet the following requirements:
• For each item returned, include the current Coordinated Universal Time (UTC) date and time, formatted as an ISO 8601 string.
• Minimize development effort.
What should you use?
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 an Azure Cosmos DB Core (SQL) API account named account 1 that uses autoscale throughput.
You need to run an Azure function when the normalized request units per second for a container in account1 exceeds a specific value.
Solution: You configure an application to use the change feed processor to read the change feed and you configure the application to trigger the function.
Does this meet the goal?
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.

You have the Azure Cosmos DB for NoSQL containers shown in the following table.

You have the items shown in the following table.

When will each item expire? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You have an Azure Cosmos DB Core (SQL) API account named account1 that has the disableKeyBasedMetadataWriteAccess property enabled.
You are developing an app named App1 that will be used by a user named DevUser1 to create containers in account1. DevUser1 has a non-privileged user account in the Azure Active Directory (Azure AD) tenant.
You need to ensure that DevUser1 can use App1 to create containers in account1.
What should you do? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You have an Azure Cosmos DB Core (SQL) API account named storage1 that uses provisioned throughput capacity mode.
The storage1 account contains the databases shown in the following table.

The databases contain the containers shown in the following table.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

You have an Azure Cosmos DB for NoSQL account that contains a container named container1.
You plan to use container1 as a key-value store that will perform point reads on the item ID and partition key.
You need to define an indexing policy for container! The solution must meet the following requirements:
• Provide the ability to set DefauitTimeToLive for container1.
• Minimize implementation time.
• Minimize costs.
How should you complete the JSON definition of the indexing policy? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You have two Azure Cosmos DB for NoSQL containers named Contained and Contained. You plan to process the change feed for each container by using the following:
• Containers Pull model
• Container2: Change feed processor
You need to track the current processing point for each change feed.
What should you use for each container? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You are designing three apps named App1, App2, and App3. Each app will use a separate Azure Cosmos DB for NoSQL account. The apps have the following consistency requirements:
• App1: Reads must always return the most recent committed version of an item, where the commit occurred during the same session.
• App2: Reads must always return the most recent committed version of an item, even if the commit occurred during another session.
• App3: Write latency must be minimized and data staleness can be tolerated.
You need to recommend a default consistency level for each Azure Cosmos DB for NoSQL account. The solution must maximize concurrency.
What should you recommend for the account of each app? To answer, drag the appropriate consistency levels to the correct apps. Each consistency level may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

You have an Azure subscription. The subscription contains an Azure Cosmos DB for NoSQL account named account1 that hosts a container named Devices. Devices has a partition key named type.

You are evaluating the resource utilization of the query. How will the query be executed?
You have an Azure Cosmos DB container named owners. Each item in owners represents an owner and their pets. The following is a sample of the JSON

You are writing a query that will retrieve the average age of each pet owned by each owner, il the pet is older than two years.
How should you complete the query? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes 01 scroll to view content.
NOTE: Each correct selection is worth one point.

You have a database in an Azure Cosmos DB Core (SQL) API account.
You need to create an Azure function that will access the database to retrieve records based on a variable named accountnumber. The solution must protect against SQL injection attacks.
How should you define the command statement in the function?
You plan to create an Azure Cosmos DB database named db1 that will contain two containers. One of the containers will contain blog posts, and the other will contain users. Each item in the blog post container will include:
• A single blog post
• All the comments associated to the blog post
• The names of the users who created the blog post and added the comments to the blog post
Items in the blog post container will be partitioned based on the post ID. Items in the user container will be partitioned based on the user ID.
You need to minimize the number of request units allocated to queries that list all the posts of a given user. The solution must minimize administrative and development effort
What should you include in the solution?
You have an Azure subscription that contains the resources shown in the following table.

You need to create a container in db1 that has the following attributes:
• Name: Contained
• Encryption: Client-side encryption with Always Encrypted
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Vou have an Azure Cosmos DB for NoSQL account that hosts a container named Container1. Contained has analytical store enabled, analytical TTL is set to 7 flays.
An application performs frequent updates to Container 1 and uses TTL to remove expired items.
Vou plan to build an incremental export from Container! to a downstream sink by using change data capture (CDC) in the analytical store and running the export from Azure Data Factory mapping data flows-
You need to configure CDC to meet the following requirement!
• The first run must include only changes from the last three days.
• The RUs required to perform the first run must be minimized.
• Subsequent runs must capture inserts updates, deletes, and TTL operations.
• The process must NOT rely on custom checkpoints based on the _is property,
Which CDC start option should you configure for the source?




















