cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching 1k records from table using "Snowflake select snap"

darshthakkar
Valued Contributor

I’m planning to fetch the data from a table using “Snowflake select snap” while putting the condition of getting 1k records ONLY in WHERE clause however it is not getting any results.

I can put the entire query in “Snowflake execute snap” as well but wanting to do with Snowflake Select as of now. Any help is highly appreciable.

Thanks!

1 ACCEPTED SOLUTION

darshthakkar
Valued Contributor

Wanted to share the solution here. The query was right, no need to change the “Fetch-size” as well.
The only thing that was missing was ’ ’ for the IDs that we were passing in the query. Thus, the query would look like -
WHERE NAME IN (‘102345’, ‘1701’, ‘5604878’)

View solution in original post

27 REPLIES 27

Hi Sir Darsh,

Good day, hope is all well.

Seems like a setting from the account that you are using in the Snowflake execute snap where a fetch size is a required setting. Hope this help

image

Thanks,
EmEm

Thank you @alchemiz, I did check the account settings and fetch size is mandatory as you mentioned.
Can you walk me through on how to resolve this?

Do we need to ensure that Fetch size is non-mandatory or increase from 100 to some x number, if that’s the case, what would be that x number?
Thank you in advance…

darshthakkar
Valued Contributor

Wanted to share the solution here. The query was right, no need to change the “Fetch-size” as well.
The only thing that was missing was ’ ’ for the IDs that we were passing in the query. Thus, the query would look like -
WHERE NAME IN (‘102345’, ‘1701’, ‘5604878’)

The Snowflake Lookup snap covers this functionality. That will allow lookup on any number of ids, it will internally batch as required. Also, Lookup snap will use bind parameters, avoiding possible issues with SQL Injection which can happen with a SQL statement string constructed in the Select snap.

Thank you @akidave for the suggestion and long term solution.