Hide confidential variables from Grafana viewer
Recently, I was trying to add a new variable to Grafana dashboard from Postgres SQL query. However, the query result was a confidential value (ex. API key) that I don’t want to expose to dashboard viewer like following.

Then I tried to use “Hide: Variable” option from variable configuration and limited the query to return only one result.

The one returned result will be default variable and will not appear in the dashboard. It’s not a perfect solution since it won’t work if we have more than two return result, but it definitely solve my problem.