Custom SQL query fails on Create DataSet using Snowflake

I have successfully established a connection to Snowflake on quicksight. I can see the schema and tables and import the tables to SPICE, but when I try to use a custom SQL I get an error that says

“Your database generated a SQL exception. This can be caused by query timeouts, resource constraints, unexpected DDL alterations before or during a query, and other database errors. Check your database settings and your query, and try again.”

on Show details, it says

“SQL compilation error: Object ‘DBNAME’ does not exist or not authorized.”

The DB NAME exists and I am able to get the result of the query on the snowflake worksheet.

Any suggestions would be helpful, Thanks in advance.

Hi @suraj - Can you please first test the custom sql in Snowflake to ensure there is NO error in the sql in terms of syntax. Also looking at your details, looks like the user which is used for the authentication is not have read privilege to the database. Please validate that as well.

Regards - Sanjeeb