HOTSPOT
You have an Azure Cosmos DB for NoSQL database named db1.
You run the following code:
For each of the following statements, select Yes if the statements true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: 1. Yes
2. No
3. No
Explanation: A default TTL of -1 means items without their own TTL do not expire. An item can omit the partition-key property, customerId. An item-level TTL of 12 is measured in seconds, not days.
Question 28
You have an Azure Cosmos DB for NoSQL account.
You configure the diagnostic settings to send all log information to a Log Analytics workspace.
You need to identify when the provisioned request units per second (RU/s) for resources within the account were modified.
You write the following query.
AzureDiagnostics
| where Category == "ControlPlaneRequests"
What should you include in the query?
A. | where OperationName startswith "SqlContainersCreate"
B. | where OperationName startswith "SqlContainersDelete"
C. | where OperationName startswith "SqlDatabasesThroughputUpdate"
D. | where OperationName startswith "AccountUpdateStart"
Show Answer
Correct Answer: C
Explanation: Filter for the control-plane operation that updates database throughput: `SqlDatabasesThroughputUpdate`. This identifies changes to provisioned RU/s.
Question 29
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account. The account hosts a container named Container1.
At some point during the past 4S hours, Container1 was deleted.
You need to restore the account to immediately before the deletion of Container1. The solution must minimize administrative effort.
What should you do first?
A. Review the event feed blade.
B. Identify the last restorable timestamp.
C. Create a new Azure Cosmos DB for NoSQL account.
D. Restore Container1 to a different Azure Cosmos DB for NoSQL account.
Show Answer
Correct Answer: A
Explanation: Review the event feed first to find when Container1 was deleted. You can then choose a restore point immediately before that event. The last restorable timestamp might be after the deletion.
Sources:
https://learn.microsoft.com/en-us/azure/cosmos-db/continuous-backup-restore-resource-model
https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-restore-in-account-continuous-backup
Question 30
You have an Azure Cosmos DB for NoSQL container named Contained that has a provisioned throughput of 1,000 request units per second (RU/s). Contained is queried by using an app named App1.
Users of App1 report that several times a day, they receive the following error message: “HTTP error code 429”
You need to improve the reliability of App1 without affecting the performance of the app.
What are two ways to improve the reliability? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A. Add a trigger to Container1.
B. Update App1 to split large requests into several smaller requests.
C. Update App1 to reduce the size of each request to less than 1 MB.
D. Increase the provisioned throughout of Container1.
E. Add retry logic to App1.
Show Answer
Correct Answer: D, E
Explanation: HTTP 429 indicates that requests are being throttled because they exceed the container’s provisioned RU/s. Increasing throughput provides more capacity, and retry logic—ideally honoring Cosmos DB’s retry-after delay—lets App1 recover from temporary throttling.
Question 31
HOTSPOT
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.
Show Answer
Correct Answer: 1. Yes
2. No
3. No
Explanation: Deterministic encryption of taxId supports equality queries. Randomized encryption of creditCard can produce different ciphertext for the same value. Creating the container does not update the encryption policy of an existing container.
Question 33
You plan to implement an Azure Cosmos DB container that will store telemetry data from 1,000 IoT devices. The data will be updated once every minute. An app will read the data once daily and generate aggregated reports that summarize the state of each device.
You need to configure a partition key for the container. The solution must meet the following requirements:
• Minimize the possibility of reaching the partition limits.
• Spread read and write operations evenly across the partitions.
• Minimize how long it takes to locate a specific set of telemetry values.
To what should you set the partition key?
A. the device ID and date
B. the device ID
C. the date and a random value
D. the date
Show Answer
Correct Answer: A
Explanation: Use the device ID and date as a composite partition key. This distributes telemetry across device-and-date partitions, reducing the chance that any one logical partition reaches its storage or throughput limits. It also supports targeted queries for a device’s telemetry on a particular date, while avoiding the hot partitions that a date-only key could create.
Question 34
You have an Azure Cosmos DB for NoSQL container named Container1 that contains 20,000 items. The items have 1,000 unique partition key values. Each item is 50 KB.
You need to evaluate the cost of running cross-partition queries by using Container1.
What should you do first?
A. Recreate Container1 by using a partition key that has higher cardinality.
B. Increase the number of items in Container1.
C. Recreate Container1 by using a partition key that has lower cardinality.
D. Decrease the number of items in Container1.
Show Answer
Correct Answer: B
Explanation: Container1 holds about 1 GB of data (20,000 × 50 KB). Cross-partition query cost depends on the number of physical partitions queried, not simply the number of unique partition key values. Increase the number of items first so the container grows enough to span multiple physical partitions.
Sources:
https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-query-container#cross-partition-query
https://learn.microsoft.com/azure/cosmos-db/partitioning
Question 35
HOTSPOT
You have an Azure Cosmos DB for NoSQL account that hosts a container named Container1. Container1 stores items in the following format.
You need to modify the contents of Container1 to conform to the following format.
How should you complete the JSON Patch document? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: "op": "move"
"from": "/color"
Explanation: The move operation relocates the existing color property from the root to /inventory/color.
Question 36
You have an Azure subscription.
You plan to create an Azure Cosmos DB for NoSQL database named DB1 that will store author and book data for authors that have each published up to ten books. Typical and frequent queries of the data will include:
• All books written by an individual author
• The synopsis of individual books
You need to recommend a data model for DB1. The solution must meet the following requirements:
• Support transactional updates of the author and book data.
• Minimize read operation costs.
What should you recommend?
A. Create a single container that stores author items and book items, and then items that represent the relationship between the authors and their books.
B. Create three containers, one that stores author items, a second that stores book items, and a third that stores items that represent the relationship between the authors and their books.
C. Create two containers, one that stores author items and another that stores book items. Embed a list of each author’s books in the corresponding author item.
D. Create a single container that stores author items and book items. Embed a list of each author’s books in the corresponding author item.
Show Answer
Correct Answer: D
Explanation: Store the author and book items in one container, using the author ID as the partition key so related items can be updated in a transactional batch. Embedding each author’s books in the author item makes the frequent “all books by author” query a single-item read; separate book items allow an individual synopsis to be read directly.
Question 37
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL database named DB1.
In DB1, you plan to create a container that will use a hierarchical partition key.
You need to identify which hierarchical partition key path to use when adding new items to the container.
Which SDK class should you use?
A. CompositePath
B. PartitionKeyDefinition
C. PartitionKey
D. PartitionKeyBuilder
Show Answer
Correct Answer: D
Explanation: Use `PartitionKeyBuilder` to build the hierarchical partition key value when adding an item. `PartitionKeyDefinition` describes the partition-key paths in the container definition; it is not used to construct an item’s partition key.
$19
Get all 134 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.