Snowflake-Labs / Excelerator

This is an Excel Addin for Windows that reads and writes data to Snowflake
Apache License 2.0
80 stars 22 forks source link

Snowflake excel add-in not working #33

Closed MeghanaKashyap closed 2 years ago

MeghanaKashyap commented 2 years ago

Connection initialization is failing with the following error message.

connection issue
ssegal100 commented 2 years ago

Would you please describe all the steps prior to this error? Also, would you look in the History tab of the Snowflake UI and let me know the last few queries executed and the one that is causing this error.

RaghuveerPendyala commented 2 years ago

I ran into a similar issue and below are the queries that got executed image

Looks like we are getting two additional columns when executing show databases which is causing this failure

ssegal100 commented 2 years ago

@RaghuveerPendyala @MeghanaKashyap Would you please show me the output of: show databases; show terse databases;

If you are getting different columns then maybe I'll have to switch to use 'show terse databases;'. I don't know why it would be different though. Thanks.

RaghuveerPendyala commented 2 years ago

Show database : image show terse database : image

I tried doing a quick check using show terse database and even it has mismatch of count of columns image

Instead of doing select * from result_scan , can we select only "name" which contains the database name and this way there is no impact to Snowflake Excel Add-in as a result of future changes from Snowflake.

show databases; WITH databases (name) as (select "name" from table(result_scan(last_query_id()))) select name from databases;

ssegal100 commented 2 years ago

@RaghuveerPendyala Yes that is the best solution. Thank you! I'm going to hunt down the reason for the last 2 columns from showing up. I've never seen them before. But you are right, I will just pull the 'name' column only.

ssegal100 commented 2 years ago

@RaghuveerPendyala I've uploaded a version with the changes to the query. Please test and close this issue if it's working properly. The reason that this is an issue is that the Show Databases command returns different columns based on if certain features are enabled in the Snowflake account.

RaghuveerPendyala commented 2 years ago

Thanks @ssegal100 , I can confirm fix is working for me

MeghanaKashyap commented 2 years ago

Thank you so much for fixing this indeed a great help! 👍 @ssegal100