I want to upload the data to cosmos DB (NoSQL API). Here is my Partition key logic for the Table
partition key : /x_id/location/name unique keys : [/source, /type]
The JSON file I want to upload is
[
{
"x_id": "1",
"type": "ROLL",
"location": "10",
"source": "A",
"event_name": "B"
},
{
"x_id": "2",
"type": "ROLL",
"location": "11",
"source": "C",
"event_name": "D"
}
]
It's giving me the below error for saving the data
Error bulk creating items for container table_name:
Cannot use the 'in' operator to search for 'location' in 1
But when I add single items to the same container it's working fine, but when doing bulk upload it starts giving the above error.
Option used for bulk upload : Upload Item
Can anyone help with this?
/x_id/location/name
click Add hierarchical partition key
for adding each key in order. Since there is no column named name
in the sample document shared, I replaced that with event_name
.