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

SQL compilation error: syntax error line 1 at position 76 unexpected '(' #19

Closed marcotielen closed 3 years ago

marcotielen commented 3 years ago

Getting a compilation error when trying to upload new data to a new table ("create a new table then upload").

ssegal100 commented 3 years ago

Hi. What are the details of the error message? Would you look in the Snowflake History tab and let me know what the query is that is throwing the error and what that error is? Would you send me a sample of a worksheet that is failing? Thanks.

marcotielen commented 3 years ago

thanks. Thought it was the plugin that did a syntax check. Just checked. It is the Varchar(n) data type which is causing the issue. Switching to "text" fixes it. Below query breaks at opening bracket after Varchar. Guess i need to add the value n somewhere...

create or replace table "XXX"."YYY"."EXCELERATOR" ("First Name" Varchar(n),"Last Name" Varchar(n))

ssegal100 commented 3 years ago

Ok good. I should have made it more clear, you are supposed to change the '(n)' to '(50)' or whatever length you need. Maybe I'll change the default to be '(50)'. Is it ok if I close this ticket?

marcotielen commented 3 years ago

Just did a manual override of the dropdown value to Varchar(100) and now it works. Understandable though not intuitive

marcotielen commented 3 years ago

sure. please close. Perhaps add a detection and user friendly error?