We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

using text input with column header as SQL_Qry which includes 400 lines of SQL in single c

Raj_007
8 - Asteroid

Hi ,

I have to use the text input to store the select query of 400 lines in the single cell so that when i can pass this column SQL_Qry as parameter to macro which connects to snowflake.

 

 

I have to use the text input with an header SQL_Qry and pasted my 400 lines of select query into one single cell - This select works fine without any errors.

But for some reason iam getting an error saying something is wrong 

Error: Dynamic_Alteryx_Snowflake_Download_11443 (19): Record #1: Tool #70: Error SQLPrepare: SQL compilation error:
syntax error line 295 at position 132 unexpected '<EOF>'.

when i go to the text in put it says too big to display

 

any suggestions or guidance...

4 REPLIES 4
apathetichell
20 - Arcturus

presumably you are building this query somewhere else ---> throw this in a browse tool -> see what's there. This is almost always a single quote, double quote, or parenthesis which is not closed -> line 295/character 132  is the total characters in that query --- but the actual error occurs somewhere totally different where you omitted the punctuation.

Raj_007
8 - Asteroid

Hi, Thanks for the input. It is snowflake sql select clause. It is working fine when i run this query in the snowflake environment. I just copy and paste it into text input in 1 single cell so that i can pass this SQL query along with authorization etc - it has to be in 1 single cell so that is the reason i coopied and pasted into 1 single cell. 

apathetichell
20 - Arcturus

Cool - I did this. a lot.. So let's clarify a few things:

1) --- you need a single cell either to go into a batch macro OR PREFERABLY --- a dynamic input in-db.

2) this does not always have to be a single cell. My recommendation is to have this as multiple lines -> and then use a summarize tool with \n right before sending in.

3) something is cutting off ---> you are getting an error. The query you are sending is not the query you think you are sending.

 

let's try a few things:

1) confirm you are only sending one statement (ie one ;) 

2) you can write your single cell to a text file via output data. Open it. Compare it to what you think you are sending in. Identify difference. fix.

3) make sure that you are using the correct string type (vwstring ---> large max) so your query doesn't cut off because it's looking for a 400 character string.

 

If you want to fix this ---> follow my instructions.

Raj_007
8 - Asteroid

issue was wit the size of the parameter that we are passing. We have to change the size of the parameter in the macro to the max vw_string. Its working now

Labels
Top Solution Authors