Search code examples
azureazure-cosmosdb

Unable to run the most basic query in cosmosdb Data Explorer?


The default query in a new panel is select * from c

enter image description here

But when I create a new query in a new panel , that does not work?

enter image description here

Error text:

Message: {"errors":[{"severity":"Error","location":{"start":15,"end":16},"code":"SC1001","message":"Syntax error, incorrect syntax near '*'."}]} ActivityId: b5f1fde9-f18f-48c3-aa0b-e0dd97067e0f, Microsoft.Azure.Documents.Common/2.14.0

Update Did this work or fail? There are conflicting messages. If it worked:

  • why is there an error message
  • where are those 12 rows?

enter image description here


Solution

  • This is apparently a bug in the CosmosDB Data Explorer for Azure. I have created a new panel and successfully shown results in it. It does not really matter which query, as long as it is valid. Here is what I used:

    SELECT  c.registered ?? '-' as registered, c.lastName ?? '-' as lastName, 
        c.id, c._ts from c
    

    enter image description here

    After an error occurs the data output panel no longer is displayed and instead the error remains there .. permanently for that Sql Editor tab. Notice the query below is precisely the same as in the prior screenshot. But the error from a prior query is still shown instead.

    I am using chrome on macOS .

    enter image description here