Does anyone know how to create subpartitions in C#...
# azure
g
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
Copy code
new SqlContainerResourceArgs
{
  Id = "questionnaireResponses",
  PartitionKey = new ContainerPartitionKeyArgs { Paths = { "/domain", "/contractType" }, Kind = "Hash" },
}
m
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
Ah thanks, will give that a try