0

I need to be able to query values from a Cosmos DB table and display those values to a JSON file. Is this possible?

//Cosmos Table
{
"id": "usagecounters.mt",
"Logs": null,
"QnAMaker": 228,
"QnAMakerFixYes": 86,
"QnAMakerFixNo": 4,
"HolidayMenuCalls": 10,
"HolidayMenuFixYes": 18,
"HolidayMenuFixNo": 1,
"DCOpsMenuCalls": 19,
"DCOpsMenuFixYes": 15,
"DCOpsMenuFixNo": 0
}

//JSON File
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
   {
  "type": "TextBlock",
  "text": "[QnA Maker Value]", //Value from Cosmos DB
  "weight": "bolder",
  "size": "medium"
},

I need to be able to query values from a Cosmos DB table and display those values to a JSON file.

1 Answer 1

1

Those 2 are two different things, you can just use where clause to query the data

 SELECT d.QnAMaker
    FROM doc d
    WHERE d.id = "usagecounters.mt"

and you could write the whole object to JSON file

Sign up to request clarification or add additional context in comments.

1 Comment

I provide a similar answer here, with some additional options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.