Forum Discussion
I just ran across this, but did not see a response, so here goes. Yes indeed! As of this writing you can use this flag on a write:
- SpiroTaleski4 years agoValued Contributor
You can use the “Limit rows” property to specify the number of rows to be returned by the query.
- darshthakkar4 years agoValued Contributor
Does that mean, I would never be able to get 1k records from the Snowflake DB?
Today, the requirement is to fetch 1k records, tomorrow it may be 5k, 10k, so on and so forth.I’m actually putting those IDs in the WHERE clause so it might exceed the character limit of 255 characters.
- bojanvelevski4 years agoValued Contributor
You should use LIMIT for limiting the output of records.
- darshthakkar4 years agoValued Contributor
I tried limiting it but I want all those 1k records, am I doing the right thing by putting 1k IDs in the WHERE clause of Snowflake Select snap?
Still brand new to snapLogic so I’m sure there would be something where I’m making a mistake.
- bojanvelevski4 years agoValued Contributor
You have a particular set of IDs you want to process, and that set counts 1000 records? Or you just want the first 1000 from the table?
- darshthakkar4 years agoValued 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.
- darshthakkar4 years agoValued Contributor
Thank you @akidave for the suggestion and long term solution.
- darshthakkar4 years agoValued Contributor
Getting the same error even though reducing the IDs in where clause to 6:
Also the query has been limited to 10 records too.
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
Thanks,
EmEm- darshthakkar4 years agoValued Contributor
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…