DP-420 · Question #53
The below diagram illustrates the configuration settings for a container in an Azure Cosmos DB Core (SQL) API account. Which of the following statements rightly describes the container's…
The correct answer is C. Items will be expired only if they have a time to live value. The correct answer is C: Items will be expired only if they have a time to live value. In Azure Cosmos DB, the container-level TTL can be configured in three ways: (1) OFF - no items ever expire; (2) ON (set to -1) - TTL is enabled at the container level but no default…
Question
The below diagram illustrates the configuration settings for a container in an Azure Cosmos DB Core (SQL) API account. Which of the following statements rightly describes the container’s configuration?
Options
- AAll the items will be deleted after 1 hour.
- BAll the items will be deleted after 1 month.
- CItems will be expired only if they have a time to live value.
- DItems stored in containers will get retained always, regardless of the time to live value of the
How the community answered
(25 responses)- A4% (1)
- C96% (24)
Explanation
The correct answer is C: Items will be expired only if they have a time to live value. In Azure Cosmos DB, the container-level TTL can be configured in three ways: (1) OFF - no items ever expire; (2) ON (set to -1) - TTL is enabled at the container level but no default expiration is applied; items only expire if they have their own individual 'ttl' property set; (3) ON with a specific value - all items expire after that number of seconds unless overridden. The configuration shown sets TTL to 'On' with no default (i.e., -1), which means the TTL feature is enabled, but only items that explicitly have a 'ttl' property will be deleted. Items without a 'ttl' property are retained indefinitely. This makes option C correct and eliminates options A and B (which imply a fixed expiry for all items) and option D (which implies nothing ever expires).
Topics
Community Discussion
No community discussion yet for this question.