https://pulumi.com logo
Title
g

gray-baker-98982

03/01/2023, 10:41 AM
Does anyone know how to create subpartitions in C# for CosmosDb if I do this I get an error returned: Too many partition key paths (2) specified. A maximum of 1 is allowed
new SqlContainerResourceArgs
{
  Id = "questionnaireResponses",
  PartitionKey = new ContainerPartitionKeyArgs { Paths = { "/domain", "/contractType" }, Kind = "Hash" },
}
m

melodic-tomato-39005

03/01/2023, 6:33 PM
I’m not an expert on CosmosDB, but it seems like to have more than one path you might need to use Kind = MultiHash?
For MultiHash, multiple partition keys (up to three maximum) are supported for container create
g

gray-baker-98982

03/02/2023, 10:08 AM
Ah thanks, will give that a try