Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 18–22 (page: 32)

Updated On: 16-Nov-2026

You have a database named db1 in an Azure Cosmos DB for NoSQL account.
You have a third-party application that is exposed through a REST API.
You need to migrate data from the application to a container in db1 on a weekly basis.
What should you use?

  1. Azure Migrate
  2. Azure Data Factory
  3. Database Migration Assistant

Answer(s): B

Explanation:

You can use Copy Activity in Azure Data Factory to copy data from and to Azure Cosmos DB (SQL API).
The Azure Cosmos DB (SQL API) connector is supported for the following activities:
Copy activity with supported source/sink matrix
Mapping data flow
Lookup activity
Incorrect:
Not A: Azure Migrate provides a centralized hub to assess and migrate on-premises servers, infrastructure, applications, and data to Azure. It assesses on-premises databases and migrate them to Azure SQL Database or to SQL Managed Instance.
Not C: Data Migration Assistant (DMA) enables you to upgrade to a modern data platform by detecting compatibility issues that can impact database functionality on your new version of SQL Server. It recommends performance and reliability improvements for your target environment.


Reference:

https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-cosmos-db



HOTSPOT (Drag and Drop is not supported)
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
You need to design a solution to update usernames in the user container without causing data integrity issues. The solution must minimize administrative and development effort.
What should you include in the solution? 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: The change feed processor
User container
The names of the users who created the blog post and added the comments
Change feed in Azure Cosmos DB is a persistent record of changes to a container in the order they occur. Change feed support in Azure Cosmos DB works by listening to an Azure Cosmos DB container for any changes. It then outputs the sorted list of documents that were changed in the order in which they were modified.
Box 2: A post-trigger
Blog post container
A single blog post
All the comments associated to the blog post
Azure Cosmos DB supports pre-triggers and post-triggers. Pre-triggers are executed before modifying a database item, and post-triggers are executed after modifying a database item. Triggers aren't automatically executed. They must be specified for each database operation where you want them to execute.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/change-feed https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-write-stored-procedures-triggers-udfs



HOTSPOT (Drag and Drop is not supported)
You have two Azure Cosmos for NoSQL containers named Container1 and Container2.
You plan to process the change feed for each container by using the following:
-Container1: 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.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: A continuation token
Container1: Pull model
Azure Cosmos DB NoSQL, Change feed pull model in Azure Cosmos DB
You can use the change feed pull model to consume the Azure Cosmos DB change feed at your own pace. Similar to the change feed processor, you can use the change feed pull model to parallelize the processing of changes across multiple change feed consumers.
Here are some key differences between the change feed processor and the change feed pull model:
* Keeping track of the current point in processing the change feed
- Change feed pull model
Continuation token (stored in memory or manually persisted)
- Change feed processor
Lease (stored in an Azure Cosmos DB container)
* Etc.
Box 2: A lease in the lease container
Container2: Change feed


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/change-feed-pull-model



DRAG DROP (Drag and Drop is not supported)
You have an Azure subscription that contains an Azure AI Search service named search1 and an Azure Cosmos DB for NoSQL account. The account hosts a container named Container1 in consistent indexing mode.
You need to ensure that the data in Container1 is searchable by using search1.
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.
Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




To make your Azure Cosmos DB for NoSQL container searchable with Azure AI Search, you must bridge the two services using an indexer. Because your container is already in Consistent indexing mode, you have met the primary requirement for successful data extraction.
Configuration Workflow
To establish the connection and make the data searchable, follow these steps:
Step 1: Create a data source in search1 that includes a flattening query
1. Create a Data Source:
In Azure AI Search, define a data source that points to your Cosmos DB account.
Provide the Primary Connection String from the Cosmos DB "Keys" pane.
Select the specific Database and Container (e.g., products).
To make your Azure Cosmos DB container searchable via Azure AI Search, you must include a flattening query in the data source setup. This allows the indexer to map nested JSON structures into a flat format, making the data properly queryable.
Azure AI Search works best with flat datasets. Using a query in your data source definition allows you to flatten nested JSON structures or shape the data for the index.
Step 2: Configure an index in search1.
2. Define the Target Index:
Create a search index schema that matches the JSON structure of your Cosmos DB items.
Document Key: You must designate one field (usually id) as the unique key for the search index.
Attributes: Set fields to be Searchable (for full-text search), Filterable, or Sortable based on your needs.
Step 3: Configure an indexer in search1.
3. Configure the Indexer
Create the indexer to automate the data transfer.
Change Detection: The indexer uses the _ts (timestamp) field by default to track and index only new or updated items.
Schedule: Set the frequency (e.g., Hourly, Daily) to keep the search index in sync with your database.


Reference:

https://learn.microsoft.com/en-us/azure/search/search-how-to-index-cosmosdb-sql



DRAG DROP (Drag and Drop is not supported)
You have an Azure Cosmos DB for NoSQL database that hosts a container named Container1. Container1 stores customer documents that have the following structure.

You need to retrieve the city of residence and the age of each customer who is older than 40.
Which three statements should you run in sequence to build the query? To answer, move the appropriate statements from the list of statements to the answer area and arrange them in the correct order.
Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




To retrieve the city and age for documents where the age is greater than 40, you need to navigate the nested address object and the age property.
Here is how you should construct the query:
SELECT c.address.city, c.age
FROM c
WHERE c.age > 40
Step 1: SELECT c.address.city, c.age
SELECT: Uses c.address.city, c.age to project only the specific nested property you need.
Step 2: FROM c
FROM: Uses c (a common alias for the container) to represent the document source.
Step 3: WHERE c.age > 40
WHERE: Filters the results to include only documents where the age property strictly exceeds 30.


Reference:

https://azurecosmosdb.github.io/labs/java/labs/03-querying_in_azure_cosmosdb.html



Viewing page 32 of 61
Viewing questions 156 - 160 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!