Metabase is allowing me to DELETE/UPDATE/INSERT data

Hi, I'm currently with version v0.50.6. When I went to write a question in the SQL editor function I decided to try out DELETE FROM goal_groups WHERE id = 1 to see what error it gave back and I got:

Select statement did not produce a ResultSet for native query```

However when I went back to do the **SELECT * FROM goal_groups WHERE id = 1** the record had been deleted. I thought it might be a cache thing so I went to my regular SQL Editor but the data was really gone.

I would really appreciate some help to fix this, or guidance if this is a configuration mistake on my side.



If you're using native SQL then the access is based on the permission level of the user in the database you're operating on. Could you remove DELETE access for the database user in your database?

HiI @leeloo thanks for the response. However when I try to limit the access, the only options I have are the ones of:

  • Query builder and native
  • Query builder only
  • No

There is no option to disable the delete.

Screenshot 2024-06-25 at 12.44.47 p.m.


This is a change you would make in the database itself - not in Metabase. When you set up the DB connection in Metabase you provide a user ID and password for your database - that user in your database must have "delete" access. If you don't want the user to be able to execute DELETE statements via the SQL editor then you need to change the user permissions in your database.