简体   繁体   中英

Azure Digital Twin Explorer. How do you query for total number of e.g. nodes (something like COUNT())

In ADT Explorer, it seems you should simply be able to do: SELECT COUNT() FROM DIGITALTWINS... to get the number of hits for a given query. However, I keep getting 'The query returned results that could not be displayed or overlayed', presumably because its set up to return nodes, properties etc. and not a single integer as with a functional query like COUNT(). Any help explaining how to display the total number of hits on screen would be appreciated.

You can hit the settings icon and enable the output screen in the top right. 设置屏幕截图

After that, the raw response of your query will be shown in the output screen. For instance, the output of your query:

Requested query: SELECT COUNT() FROM DIGITALTWINS
Ran query for twins, page 1:
{
  "queryCharge": 2.99,
  "content-security-policy": "default-src 'self' data: 'unsafe-inline' 'unsafe-eval'; frame-ancestors 'none'",
  "content-type": "application/json; charset=utf-8",
  "date": "Mon, 12 Dec 2022 12:35:07 GMT",
  "mise-correlation-id": "69ed1cf9-df16-4026-a6fb-0d1cf4ae7bc6",
  "strict-transport-security": "max-age=2592000",
  "traceresponse": "00-e969f89deecb09057f2d02ca3c5eddf9-5dc77084297ae15c-01",
  "transfer-encoding": "chunked",
  "x-powered-by": "Express",
  "value": [
    {
      "COUNT": 8
    }
  ],
  "continuationToken": null
}

It's not pretty, but it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM