nerdexam
Microsoft

DP-420 · Question #169

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…

The correct answer is D. PartitionKeyBuilder. Manually specify the path The PartitionKeyBuilder class in the SDK can construct a value for a previously defined hierarchical partition key path. Use this class when you add a new item to a container that has subpartitioning enabled…

Design and implement data distribution

Question

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?

Options

  • ACompositePath
  • BPartitionKeyDefinition
  • CPartitionKey
  • DPartitionKeyBuilder

How the community answered

(49 responses)
  • A
    4% (2)
  • B
    8% (4)
  • C
    2% (1)
  • D
    86% (42)

Explanation

Manually specify the path The PartitionKeyBuilder class in the SDK can construct a value for a previously defined hierarchical partition key path. Use this class when you add a new item to a container that has subpartitioning enabled. https://learn.microsoft.com/en-us/azure/cosmos-db/hierarchical-partition-keys

Topics

#Hierarchical Partition Keys#Azure Cosmos DB SDK#PartitionKeyBuilder#Data Distribution

Community Discussion

No community discussion yet for this question.

Full DP-420 Practice