October 26, 2021 at 3:36 pm
Hello All,
I am brand new to Cosmos DB, I have a couple of simple queries I have done and gone through several tutorials. Some of the methods I have seen in the tutorials are not working for me so I must be doing something wrong. I need help taking the following structured JSON doc and flattening it out as follows. Any help or hints would be greatly appreciated.
id
,DayOfWeek ( monday, tuesday, wed, ect..)
,from
,to
,closed
,scheduleColor
[
{
"firstName": "Heather",
"lastName": "Bixby",
"isTreatingProvider": true,
"isBillingProvider": false,
"isSupervisingProvider": false,
"isRegisteredDentalAssistant": false,
"isHygienist": false,
"providerSchedule": {
"sunday": {
"from": "",
"to": "",
"closed": true
},
"monday": {
"from": "8:30 AM",
"to": "3:00 PM",
"closed": false
},
"tuesday": {
"from": "8:30 AM",
"to": "3:00 PM",
"closed": false
},
"wednesday": {
"from": "8:30 AM",
"to": "3:00 PM",
"closed": false
},
"thursday": {
"from": "8:30 AM",
"to": "3:00 PM",
"closed": false
},
"friday": {
"from": "8:30 AM",
"to": "3:00 PM",
"closed": false
},
"saturday": {
"from": "6:30 AM",
"to": "6:30 PM",
"closed": false
},
"scheduleColor": "#5499C7"
},
"id": "d5d06d2b-59ae-46fc-a9e3-e6c4b0e04ea7",
"createdOn": "2021-09-21T17:31:05.6680282Z",
"createdBy": "9b93d22a-a13a-4dbb-835a-3831167497ec",
"modifiedOn": "2021-10-07T17:52:11.8304476Z",
"modifiedBy": "9b93d22a-a13a-4dbb-835a-3831167497ec",
"isDeleted": false,
"partitionKey": "Provider/vis-dev-ap-20",
"_rid": "LcoPAIOHxX-oDwAAAAAAAA==",
"_self": "dbs/LcoPAA==/colls/LcoPAIOHxX8=/docs/LcoPAIOHxX-oDwAAAAAAAA==/",
"_etag": "\"e7173a38-0000-0500-0000-615f33cc0000\"",
"_attachments": "attachments/",
"_ts": 1633629132
}
]
***SQL born on date Spring 2013:-)
October 27, 2021 at 4:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
January 24, 2022 at 9:18 am
This was removed by the editor as SPAM
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply