What am I missing? Aren't i setting the default warehouse in the resource connector?
When someone is writing an app how can I make it so they use the compute_wh?
To further complicate things - My retool user has COMPUTE_WH as the default warehouse.
Apologies for this issue. You are correct, the query should definitely be using the 'Database warehouse' as defined in the Resource set up.
It looks like currently, select current_warehouse() is needed inside the SQL query followed by the action to perform on the table. Once I reproduce this I can file a bug report to let our engineers know that the SQL option for Snowflake queries is incorrectly throwing that error.
To your third question "When someone is writing an app how can I make it so they use the compute_wh?" is that not what you were able to do in your fifth image? Maybe I am misunderstanding
I believe for now you will need to do exactly what you are doing and preface the SQL query with SELECT CURRENT_WAREHOUSE but I will do some testing to doublecheck this since if there are multiple tables in the warehouse then we need to know how to specify them.
On our cloud instance for testing, I was able to run SQL mode queries to a snowflake instance without needing to specify the warehouse besides having the warehouse set in the resource set up
So I am not how how to reproduce the 'no active warehouse selected' error message
What version of self hosted are you running? Maybe updating to a newer version will get us to a point where this bug was resolved.
For now, if you can't update the version. The workaround where you use SELECT CURRENT_WAREHOUSE() might be the solution for all queries to get around that error.
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() .
Ahhhh ok thank you for letting me know @bithippie!
It could definitely be a permissions related complication
No worries on getting to the bottom of that right now, it sounds like the second connection to snowflake you configured works which is the most important thing.
I will mark that as a solution in case another user hits the same issue and finds this thread so they can double check their permissions.
Let me know if there is anything else we can help you with!!!