logo
Exam overview and study plan

DP-420 Practice Questions

Azure Cosmos DB Developer Specialty

Read questions, check verified answers and discuss the reasoning. Use reading options to shape your revision, or switch to the simulator for timed practice.

View 105 free questions

105 questions in this view

Page 1 of 18

Question 1

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.

Select an answer above, then submit your vote. Reading or practicing does not cast a vote.

Question 2

You have a Retrieval-Augmented Generation (RAG) application that uses an Azure Cosmos DB for NoSQL container.

 

The container stores product items that have a property named description for searchable text and a property named descriptionVector for embeddings. The container has a full-text index on /description and a DiskANN vector index on /descriptionVector.

 

You need to return the 10 items that rank the highest based on both semantic similarity and full-text relevance.

 

How should you complete the hybrid search query? To answer, select the appropriate options in the answer area.

 

NOTE: Each correct selection is worth one point.

SELECT TOP 10
c.id,
c.description
FROM c
ORDER BY RANK(
VectorDistance(c.descriptionVector, @queryVector),
)

Question 3

You have an agent that uses Azure Cosmos DB for NoSQL to store agent memory. The agent has the following Python code.

 

provider = CosmosMemoryContextProvider(...)
agent = Agent(context_providers=[provider])

async with provider:
    session1 = agent.create_session()
    session1.state.setdefault(provider.source_id, {})["user_id"] = "user-101"

    await agent.run("I avoid sesame.", session=session1)
    await provider.flush()

    session2 = agent.create_session()
    session2.state.setdefault(provider.source_id, {})["user_id"] = "user-101"

    await agent.run(
        "Which seed should recipes exclude for me?",
        session=session2
    )

    session3 = agent.create_session()
    session3.state.setdefault(provider.source_id, {})["user_id"] = "user-202"

    await agent.run(
        "Which seed should recipes exclude for me?",
        session=session3
    )

 

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

 

NOTE: Each correct selection is worth one point.

Answer Area
StatementsYesNo

The sesame memory is available to session3.

session2 resumes the exact conversation transcript from session1.

The sesame memory is available to session2 despite the use of a new session.

Question 4

You have the following T-SQL query that runs against Azure Cosmos DB data mirrored to Microsoft Fabric.

 

SELECT
    s.id AS shipmentId,
    p.storageTemperature,
    i.itemId,
    x.weight
FROM dbo.ShipmentEvents AS s
CROSS APPLY OPENJSON(s.packages)
WITH (
    storageTemperature int '$.storageTemperature',
    items nvarchar(max) '$.items' AS JSON
) AS p
OUTER APPLY OPENJSON(p.items)
WITH (
    itemId varchar(40) '$.id',
    properties nvarchar(max) '$.properties' AS JSON
) AS i
OUTER APPLY OPENJSON(i.properties)
WITH (
    weight int '$.weight'
) AS x
WHERE p.storageTemperature >= 5;

 

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

 

NOTE: Each correct selection is worth one point.

Answer Area
StatementsYesNo

The query returns rows only for shipment events that include packages.

A package with two items that has a storageTemperature set to 4 produces two result rows.

A package without items that has a storageTemperature set to 7 produces one result row in which itemId and weight are NULL.

Question 5

You have an Azure Cosmos DB for NoSQL account named Account1 that has public network access disabled and uses a private endpoint. Account1 contains the data shown in the following table.

 

Database name

Container name

Property

Commerce

Transactions

productId, amount, transactionType

Commerce

Customers

customerId, name

Catalog

Products

productId, category

Catalog

Suppliers

supplierId, name

 

You plan to implement a Microsoft Fabric workspace in the same Azure region as Account1. The workspace will contain mirrored databases from the account. You will use the SQL analytics endpoint to calculate daily net transaction amounts by product category and transaction type.

 

You need to configure Fabric mirroring. The solution must mirror only the containers required for the analysis.

 

What should you configure? To answer, select the appropriate options in the answer area.

 

NOTE: Each correct selection is worth one point.

Connectivity:
Mirrored database configuration:

Question 6

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL database named db1. The subscription is linked to a Microsoft Entra tenant that contains a user named User1.

You need to delegate permissions to User1 to meet the following requirements:

  • Ensure that User1 can manage db1.
  • Prevent User1 from accessing connection strings.
  • Prevent User1 from accessing the data stored in db1.

Which role should you assign to User1?

Select an answer above, then submit your vote. Reading or practicing does not cast a vote.