I have a hunch it's because I never granted use compute_wh to role retool_readonly_role.
I've since deleted this connection because we're rethinking how databases are structured in snowflake, so I don't have a quick way to confirm this hunch.
However, I configured another connection between Retool and Snowflake using a different service account and role, and in that case I don't have toselect current_warehouse() .