Cannot import data from Snowflake with "Cannot perform SELECT. This session does not have a current database" error

Problem

When trying to import data from Snowflake, it shows the below error although the database is set on the Snowflake connection.

Cannot perform SELECT. This session does not have a current database. Call 'USE DATABASE', or use a qualified name.

Solution

This usually happens when you do not set role information on the connection.
You can set the role with “Additional Parameters” like the below screenshot.

e.g.

role=SOME_ROLE

1 Like