Search code examples
postgresqlgrafana

Grafana dashboard not allowing me to edit raw SQL


I am currently using an account with 'Admin' privileges, and my dashboard is in the editable mode. I'm able to connect to my PostgreSQL database successfully and perform queries via the Grafana interface.

Yet, when I attempt to modify the raw SQL query within the 'Preview' section, I'm faced with an unexpected error message: "Cannot edit on read-only editor."

This scenario is puzzling since both my user account and dashboard seem to have the necessary permissions, and the dashboard is set to editable mode. Could you please guide me on how I can edit the raw SQL?

Best regards, Andy


Solution

  • Preview is preview. No editing.

    You have two options:

    • change query through Builder,
    • switch to Code editor.

    If you'll decide to move to Code editor, you can copy your current query from preview, paste there and modify as you want. But remember, you cannot switch back from editor to Builder with losing your query.