When I create a new query in the Data Explorer, I first see a text field where I enter the name of the query.
Then I click “Create New” and add the description and the SQL query.
In my case, for this test, I’m using the simple query from the help section:
SELECT user_id FROM posts
Now I can click “Save changes and run”, but I get the following result:
So a single-column result with the column name “?column?” and the value “1”. This behavior occurs not only with this query, but also with other queries known to work correctly.
As soon as I go back to the list of queries in the Data Explorer and then open the query I just created, the query shown there is “SELECT 1”:
To me, this looks like a bug or an issue with our Discourse instance. About 1–2 years ago, I actively created queries in the Data Explorer, and this problem did not occur. Is something misconfigured in our Discourse instance?
One more note: When I open older queries I created or pre-built ones, I only see an empty window; the query text is not visible. However, if I open the direct link to the query, e.g., discourse…net/admin/plugins/explorer?id=-13, I can see the query text and the query is executable.
