How does metabase prevents editing data in snowflake & athena?

Hello all!

I've posted this question: SNOW-751706: allow to tell if a given sql string is "read only" · Issue #1460 · snowflakedb/snowflake-connector-python · GitHub

and was asked to question it here instead.

How does metabase connect to snowflake and aws athena servers to prevent execution of "questions" like "DROP TABLE my_table"? (Got Select statement did not produce a ResultSet for native query)

I saw that some databases allow you to connect via a "read_only" connection like redshift, but was curious how you do that in other databases.

Thanks a lot

Metabase expects to receive a result set in every query, so the question shouldn't run. Also there are some parameters we inject to the connection strings (on some db's) that are not editable by users, which make the connections read only. I don't remember if those are there for Snowflake, but even though, DML statements shouldn't work