0
votes

A newbie to Snowflake and I cannot use the database navigator to look at a table.

It gives me the following error: "Cannot perform DESCRIBE. This session does not have a current database. Call 'USE DATABASE', or use a qualified name."

I changed the context to use the right database. I changed my role to SYSADMIN. I entered "USE DATABASE CITIBIKE".

Still no joy.

2

2 Answers

1
votes

You can try specifying your database while creating the connection with snowflake as below:

const connection = snowflake.createConnection({
    username: "username",
    password: "password",
    account : "accountname",
    database: "database name"
});

Source : https://docs.snowflake.com/en/user-guide/nodejs-driver-use.html

Note : you can also specify schema, warehouse and role. this worked for me

0
votes

Are you using a worksheet or have you tried at the worksheet level with the necessary permissions to the object? Perhaps try using the qualified name? For example, if you're trying to describe a table in Snowflake: desc table database_name.schema_name.table_name

Please note if any of the objects here have special characters, were stored in lowercase, or have spaces, you may need to put double quotes around them.

Edit: After further investigation and understanding of the issue, this is actually a UI issue the Snowflake Dev team is working to resolve. Hoping to see a fix in the next release.