You have operational data in an Azure Cosmos DB for NoSQL database.
Database users report that the performance of the database degrades significantly when a business analytics team runs large Apache Spark-based queries against the database.
You need to reduce the impact that running the Spark-based queries has on the database users.
What should you implement?
A. Azure Synapse Link
B. a default consistency level of Consistent Prefix
C. a default consistency level of Strong
D. the Spark connector
Show Answer
Correct Answer: A
Explanation: Azure Synapse Link lets Spark analytics query a separate analytical store, reducing contention with operational queries against Azure Cosmos DB. Changing the consistency level or using the Spark connector alone does not isolate those workloads.
Question 72
Your company develops an application named App1 that uses the Azure Cosmos DB SDK and the Eventual consistency level.
App1 queries an Azure Cosmos DB for NoSQL account named account1.
You need to identify which consistency level to assign to App1 to meet the following requirements:
• Maximize the throughput of the queries generated by App1 without increasing the number of request units currently used by the queries.
• Provide the highest consistency guarantees.
Which consistency level should you identify?
A. Strong
B. Bounded Staleness
C. Session
D. Consistent Prefix
Show Answer
Correct Answer: C
Explanation: Session consistency provides stronger guarantees than Eventual consistency, including read-your-own-writes and monotonic reads, while using the same read RU charge. Strong and Bounded Staleness can increase read RU consumption, so Session is the strongest option that meets both requirements.
Question 73
HOTSPOT
You plan to create an Azure Cosmos DB container named account that will contain items in the following format.
You need to define a query that will return the ids of all accounts that have ever recorded a negative value for balance.
How should you complete the query? To answer select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: FROM n IN c.balanceStatus
WHERE n.balance < 0
Explanation: The subquery checks each entry in the balanceStatus array. EXISTS is true if any entry has a negative balance, so the outer query returns that account’s id.
Question 74
You have an Azure Cosmos DB for NoSQL account named account1.
You need to create a container named Container1 in account1 by using the Azure Cosmos DB .NET SDK. The solution must ensure that the items in Container1 never expire.
What should you set?
A. TimeToLivePropertyPath to null
B. TimeToLivePropertyPath to 0
C. DefaultTimeToLive to null
D. DefaultTimeToLive to –1
Show Answer
Correct Answer: C
Explanation: Set DefaultTimeToLive to null to disable TTL for the container. With TTL disabled, items cannot expire, even if an item has its own TTL value. A value of -1 enables TTL and allows item-level TTL values to cause expiration.
Question 75
You have an Azure Cosmos DB for NoSQL account configured for global distribution across four regions.
At connection time, the SQL SDK needs to identify the optimal endpoint for reading and writing.
Which two factors can influence the SDK? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A. the consistency level in RequestOptions
B. regional latency
C. the default consistency level
D. the PreferredLocations configuration
E. a region being available
Show Answer
Correct Answer: B, D
Explanation: The SQL SDK can use regional latency and the configured PreferredLocations to choose endpoints. Consistency settings do not determine endpoint selection.
Question 76
You have an Azure Cosmos DB database that contains a container named container1. The container1 container is configured with a maximum of 20,000 RU/s and currently contains 240 GB of data.
You need to estimate the costs of container1 based on the current usage.
How many RU/s will be charged?
A. 240
B. 4,000
C. 20,000
D. 24,000
Show Answer
Correct Answer: C
Explanation: The container is configured for 20,000 RU/s, so 20,000 RU/s is the throughput figure used for this estimate. The 240 GB of data is billed separately as storage; it is not added to the RU/s charge.
Sources:
https://azure.microsoft.com/pricing/details/cosmos-db/autoscale-provisioned
Question 77
You plan to create an Azure Cosmos DB account that will use the NoSQL API.
You need to create a grouping strategy for items that will be stored in the account. The solution must ensure that write and read operations on the items can be performed within the same transaction.
What should you use to group the items?
A. logical partitions
B. physical partitions
C. databases
D. containers
Show Answer
Correct Answer: A
Explanation: Azure Cosmos DB transactions are scoped to a single logical partition. Group the items under the same logical partition key so reads and writes can participate in the same transaction.
Question 78
HOTSPOT
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.
Show Answer
Correct Answer: Item1: 60 seconds
Item2: Never
Item3: Never
Explanation: TTL values are in seconds. Container1 enables TTL, so Item1 uses its 60-second setting. Container2 has TTL disabled, so Item2 cannot expire. Item3’s TTL of -1 overrides its container’s default and prevents expiration.
Question 79
You are designing an Azure Cosmos DB for NoSQL solution to store data from IoT devices. Writes from the devices will occur every second. Data will be retained indefinitely.
The following is a sample of the data.
You need to select a partition key that meets the following requirements for writes:
• Minimizes the partition skew
• Avoids capacity limits
• Avoids hot partitions
What should you do?
A. Use deviceManufacturer as the partition key.
B. Create a new synthetic key that contains deviceId and timestamp.
C. Create a new synthetic key that contains deviceId and deviceManufacturer.
D. Use deviceId as the partition key.
Show Answer
Correct Answer: B
Explanation: Create a synthetic partition key containing deviceId and timestamp. Including the timestamp spreads a device’s ongoing writes across partition-key values instead of concentrating them on one logical partition, reducing hot-partition and capacity-limit risks. deviceManufacturer has low cardinality, while combining deviceId with manufacturer would still concentrate a device’s writes.
Question 80
HOTSPOT
You have an Azure Cosmos DB for NoSQL container named Contacts that is configured as shown in the following exhibit.
Contacts contains the items shown in the following table.
To Contacts, you plan to Insert the items 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.
Explanation: The unique key combines familyName and givenNames and applies within each companyID partition. It is case-sensitive, so item 1 is distinct. Item 2 duplicates the existing null-valued combination. Item 3 is in a different partition.
$19
Get all 177 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.